Skip to content

Support a short check syntax (check: no_token_in_logs) #10

Description

@DataDave-Dev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions