Expand description
Ignore comment support for nginx-lint
This module provides support for inline ignore comments that ignore lint errors on specific lines.
§Comment Formats
§Comment-only line (targets next line)
# nginx-lint:ignore rule-name reason
server_tokens on;§Inline comment (targets current line)
server_tokens on; # nginx-lint:ignore rule-name reasonrule-name: Required. The name of the rule to ignorereason: Required. A reason explaining why the rule is ignored
Structs§
- Filter
Result - Result of filtering errors with ignore tracker
- Ignore
Tracker - Tracks ignored rules per line
- Ignore
Warning - A warning generated from parsing ignore comments
Functions§
- filter_
errors - Filter errors using an ignore tracker, returning remaining errors and ignored count
- parse_
context_ comment - Parse context comment from file content
- warnings_
to_ errors - Convert ignore warnings to lint errors