"Shallow" validation option for Bicep lint CLI
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
`bicep lint main.bicep` or `bicep lint main.bicepparam` will by default lint all files referenced via `module` or `using` statements.
Especially with `.bicepparam` files, it feels like it might be useful to run in shallow mode to avoid reporting the same linter warnings multiple times. For example, you may want to do:
```sh
# shallow mode because these files reference main.bicep, which we're linting separately
bicep lint --shallow dev.bicepparam
bicep lint --shallow prod.bicepparam
# non-shallow mode to lint recursively
bicep lint main.bicep
```
This could also be a compelling use-case for wildcard support - e.g.:
```sh
# lint all files in a given directory, avoiding duplicates
bicep lint .
```
Idea comes from this PR comment: https://github.com/Azure/bicep/pull/12280#discussion_r1373846047
Contributor guide
Research direction
Start at the Bicep lint CLI handling and trace how module and using references are recursively linted. Define the shallow behavior for the supplied .bicep and .bicepparam files, then verify that shallow commands avoid duplicate referenced-file diagnostics while normal linting remains recursive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100