Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion python_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,8 @@
logging.basicConfig(level=logging.DEBUG if args.debug else logging.INFO)

if any({linter not in LINTERS for linter in args.linter}):
LOG.error("Invalid linter choice: %s", args.linter)
sanitized_linter = [re.sub(r'[\x00-\x1F]', '', linter) for linter in args.linter]
LOG.error("Invalid linter choice: %s", ', '.join(sanitized_linter))
sys.exit(1)

sarif_runs: List[dict] = []
Expand Down