feat(linter): GL033 static dead-rules detection
Add rule GL033 that warns when every rule in a job's rules: block has an explicit when: never, making the job permanently excluded from any pipeline run. This is a pure static check — no if: evaluation or context required. Only rules with literal when: never trigger it; rules with no when: (defaults to on_success), when: manual, when: always, or when: on_failure are treated as reachable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -114,4 +114,8 @@ const (
|
||||
// the job's own variables:, or any workflow:rules:variables: block.
|
||||
// May be a false positive for variables set in GitLab CI/CD project settings.
|
||||
RuleUndeclaredVariable = "GL032"
|
||||
|
||||
// GL033: every rule in a job's rules: block has when: never, so the job
|
||||
// can never be included in any pipeline run.
|
||||
RuleDeadRules = "GL033"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user