Context
Built-in checks are referenced verbosely:
check: "python3 -m becwright.checks.no_token_in_logs". That leaks the Python
implementation and confuses people watching non-Python repos. A short form like
check: no_token_in_logs would be much friendlier.
Proposed approach
- When a rule's
check value is a bare built-in name (it matches a module in
becwright.checks), expand it to the real invocation before running.
- Keep the full shell-command form working (fully backward compatible).
- Decide where resolution happens (likely when loading rules in
rules.py, or
just before running in engine.py).
Acceptance criteria
check: no_token_in_logs runs the corresponding built-in check.
- The existing full-command form still works.
- Tests cover both forms.
Notes
This changes how the check field is interpreted — please discuss the exact
resolution rules (e.g. how args like forbid --pattern ... fit) in this issue
before implementing.
Relevant files
src/becwright/rules.py, src/becwright/engine.py.
Context
Built-in checks are referenced verbosely:
check: "python3 -m becwright.checks.no_token_in_logs". That leaks the Pythonimplementation and confuses people watching non-Python repos. A short form like
check: no_token_in_logswould be much friendlier.Proposed approach
checkvalue is a bare built-in name (it matches a module inbecwright.checks), expand it to the real invocation before running.rules.py, orjust before running in
engine.py).Acceptance criteria
check: no_token_in_logsruns the corresponding built-in check.Notes
This changes how the
checkfield is interpreted — please discuss the exactresolution rules (e.g. how args like
forbid --pattern ...fit) in this issuebefore implementing.
Relevant files
src/becwright/rules.py,src/becwright/engine.py.