feat: add banner-style comment check to fail pipeline#34
Closed
alexmohr wants to merge 2 commits into
Closed
Conversation
6d38b82 to
98c3e96
Compare
…mments Adds a new check mirroring the no-unicode-check pattern. A new script no-banner-comment-check.py detects lines consisting of repeated decorative characters and fails the pre-commit hook. The check is controlled via no-banner-comment-extensions (file extensions to scan) and is configurable via banner-comment-chars (regex character class of fill characters, default: =\-#\*/~_+) and banner-comment-min-length (minimum run length, default: 5). These inputs are wired through action.yml, checks.yml, and run_checks.py, with README documentation.
98c3e96 to
fb844af
Compare
Contributor
Author
|
Work integrated into PR #39 (feat/pre-commit-hook-args-config). The no-banner-comment-check.py script, PEP 723 header, and .pre-commit-config.yml hook entry (with args:) are all present on the args-config branch. The checks.yml/action.yml flag-passing approach was replaced by the config-args pattern. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
no-banner-comment-check.pyscript that detects lines consisting of repeated decorative characters (=,-,#,*,/,~,_,+) and reports them with file path and line numberno-banner-comment-extensionsinput acrossaction.yml,checks.yml, andrun_checks.py, mirroring the existingno-unicode-extensionspattern exactlyREADME.mdThe check is opt-in and disabled by default. Enable it by passing a comma-separated list of extensions:
A line like
# ============================================================in a checked file will cause the pipeline to fail with:Checklist
Related
Notes for Reviewers
Alexander Mohr alexander.m.mohr@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH
Provider Information