Azure / Azure/bicep

New linter rule for private bicep registry modules "use-latest-module-versions"

Open
#9,035 5 comments 10 reactions 0 assignees View on GitHub
devdiv enhancement story: linter rules
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Is your feature request related to a problem? Please describe.**
```text
demo-registry.private.registry.io/bicep/gateway:1.0.0
demo-registry.private.registry.io/bicep/gateway:1.1.1
demo-registry.private.registry.io/bicep/gateway:1.1.2
```
Above version of bicep module present in registry.
currently this module is consumed by other bicep files in differnt places.
```
module gateway 'br:demo-registry.private.registry.io/bicep/gateway:1.1.1' {

}
```
Currently there is no way if these bicep using older bicep registry version?

**Describe the solution you'd like**
If we have linter rule in bicepconfig.json something like use-latest-module-versions which checks on registry if we have higher version of module available in remote registry then it should give warning or bicep build failure on level 'error'.

```
"use-latest-module-versions": {
"level": "warning"
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the linter configuration example in bicepconfig.json and the described private registry module references. Determine how a rule could compare consumed versions with higher versions in the registry and report the configured warning or error; done means older module references are detected at the requested severity.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.