Skip to content

v1.8.4

Choose a tag to compare

@github-actions github-actions released this 30 Sep 22:43
· 30 commits to main since this release

bes-relevance-lint now prints a suggested fix for statements the analyzer can safely rewrite, and W602 covers more cases. Both come from moving to bigfix-relevance-analyzer 1.13.3. No other hook changed.

⚠️ Upgrade notes

  • bes-relevance-lint needs bigfix-relevance-analyzer >= 1.13.3 (previously >= 1.12.4). As before, this applies only on Python 3.11+.
  • Expect new W602 warnings. W602 used to flag only a whose filter written on a singular spelling. It now also flags an unfiltered singular in the middle of a chain when a plural is built from it, for example exists values of setting "x" of client. That statement errors when the setting is absent, while settings "x" answers False. Like any warning, these fail the hook only with --strict.

Added

  • Suggested fixes in bes-relevance-lint output. When the analyzer can safely rewrite a whole statement (today, the singular spellings behind W602), the fixed statement is printed once, under that statement's first finding:

    task.bes:12: [W602] warning: ... (singular-spelling-mid-chain)
        suggested fix: exists values of settings "x" of client
    

    Files are not rewritten, and a suggestion does not change the exit status. A statement with several fixable findings still prints one suggestion.

Changed

  • The W602 description is updated in the hook docstring, .pre-commit-hooks.yaml and the README codes table. The README and docstring now describe suggested fixes in place of "there is no auto-fix".

Full diff: v1.8.0...v1.8.4