Linter rule to report unnecessary disable-next-line
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 79
Description
**Is your feature request related to a problem? Please describe.**
With time some `disable-next-line` pragmas may get stale.
**Describe the solution you'd like**
Add a linter rule that would report useless `disable-next-line` pragmas.
This should issue a warning/error (the pragma suppression would be needed if there's no reference to `foo` in `output`):
```bicep
#disable-next-line no-unused-existing-resources
resource foo 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
name: 'foo'
}
output bar string = foo.apiVersion
```
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by locating the linter and disable-next-line handling, then define the rule so it reports a useless suppression while retaining suppressions needed for diagnostics, including the provided Bicep example.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100