Skip to content

[codex] add check forbidden tags hook#129

Merged
hofbi merged 1 commit into
hofbi:masterfrom
lukasoyen:codex/add-forbidden-tag-hook-followup
Apr 30, 2026
Merged

[codex] add check forbidden tags hook#129
hofbi merged 1 commit into
hofbi:masterfrom
lukasoyen:codex/add-forbidden-tag-hook-followup

Conversation

@lukasoyen
Copy link
Copy Markdown

@lukasoyen lukasoyen commented Apr 30, 2026

Summary

Adds the check-forbidden-tags Bazel pre-commit hook.

The hook reports Bazel rule calls containing a disallowed tag and supports --allow-in-rule-kind to permit that tag for rule kinds matching a regular expression.

Validation

  • uv run --extra dev pytest tests/test_build_file_parsing_util.py tests/test_check_rule_has_tag.py tests/test_check_forbidden_tags.py
  • uv run --with ruff ruff check dev_tools/build_file_parsing_util.py dev_tools/check_rule_has_tag.py dev_tools/check_forbidden_tags.py tests/test_build_file_parsing_util.py tests/test_check_rule_has_tag.py tests/test_check_forbidden_tags.py
  • uv run --with ruff ruff format --check dev_tools/build_file_parsing_util.py dev_tools/check_rule_has_tag.py dev_tools/check_forbidden_tags.py tests/test_build_file_parsing_util.py tests/test_check_rule_has_tag.py tests/test_check_forbidden_tags.py
  • uv run --with ty ty check dev_tools/build_file_parsing_util.py dev_tools/check_rule_has_tag.py dev_tools/check_forbidden_tags.py tests/test_build_file_parsing_util.py tests/test_check_rule_has_tag.py tests/test_check_forbidden_tags.py
  • uv run check-forbidden-tags --forbidden-tag=no-remote

@lukasoyen lukasoyen force-pushed the codex/add-forbidden-tag-hook-followup branch 2 times, most recently from e857947 to 1859fbf Compare April 30, 2026 12:38
Comment thread pyproject.toml Outdated
Comment thread dev_tools/forbidden_tag.py Outdated
Comment thread dev_tools/forbidden_tag.py Outdated
Comment thread tests/test_forbidden_tag.py Outdated
Comment thread tests/test_forbidden_tag.py Outdated
@lukasoyen lukasoyen force-pushed the codex/add-forbidden-tag-hook-followup branch from 1859fbf to 069642e Compare April 30, 2026 14:47
@lukasoyen lukasoyen changed the title [codex] add forbidden tag hook [codex] add check forbidden tags hook Apr 30, 2026
@hofbi hofbi merged commit 3f5b5b9 into hofbi:master Apr 30, 2026
12 checks passed
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.

2 participants