Skip to content

Fix CLI quirks: blocking_mode, config errors, NOOP report crash, Python name matching - #536

Open
ivanklee86 wants to merge 7 commits into
mainfrom
fix/quirks
Open

ivanklee86 wants to merge 7 commits into
mainfrom
fix/quirks

Conversation

@ivanklee86

Copy link
Copy Markdown
Owner

Summary

Fixes six quirks found while documenting the codebase. Each fix is its own commit with a regression test.

  • Terminal report crash on NOOP results: NOOP rows were included in the violations table without result text, which caused an UnboundLocalError or stale text. Only WARN and BLOCK results are listed now, the same as the GitHub report.
  • Invalid config in grade: the ValidationError was printed, then the command crashed with a NameError. grade and configs validate now share load_config(), which exits with code 1. print_error is typed NoReturn.
  • Debug env var typo: RUBRICAL_DEBUG now works, and RUBGRICAL_DEBUG is still accepted for backwards compatibility.
  • blocking_mode was ignored: --block/--no-block now defaults to the config's blocking_mode (default true) and overrides it when given. If blocks are found while blocking is off, rubrical says so instead of printing "All dependencies up to date!".
  • Python name matching: config names are matched against Python dependencies using PEP 503 normalization, so mopidy_dirble matches Mopidy-Dirble. Other package managers keep exact matching through a new BasePackageManager.normalize_name hook.
  • Stray string: removed a leftover test-output string at the end of rubrical/rubrical.py.

Behavior changes

  • Setting blocking_mode: false in a config now changes the exit code. Previously the setting had no effect.
  • blocking_mode: null now fails validation, because the field is now bool.
  • Some Python config entries that differed only in case or separators will now match and may produce new warnings or blocks.

Testing

  • task python:lint and task python:test pass (44 passed, 4 skipped; the skipped tests are the GitHub tests, which need a token).
  • mkdocs build --strict passes. docs/commands.md was regenerated and docs/configuration.md updated.

馃 Generated with Claude Code

ivanklee86 and others added 6 commits October 10, 2026 00:45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NOOP results were included in the violations table but had no result text,
causing an UnboundLocalError or a row with stale text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
grade printed the ValidationError but continued, then crashed with a
NameError. Both commands now use load_config, which exits with code 1 on an
invalid config. print_error is annotated NoReturn to match its behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The env var was misspelled as RUBGRICAL_DEBUG; the old name is still
accepted for backwards compatibility.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--block/--no-block now defaults to the config's blocking_mode (default
true) and overrides it when given. Previously blocking_mode was never
read. When blocks are found but blocking is off, rubrical now says so
instead of printing 'All dependencies up to date!'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Python names are now compared per PEP 503 (case-insensitive; runs of -, _
and . are equivalent), so 'mopidy_dirble' in the config matches
'Mopidy-Dirble' in requirements.txt. Other package managers keep exact
matching via the new BasePackageManager.normalize_name hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Important

  • 馃攳 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

鈿欙笍 Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 573bf1d8-1515-4e58-b36d-454832bad0ad

  • Autofix 路 Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

鉂わ笍 Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant