Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter - Improve template governance by supporting metadata linting #14096

Open
audhage opened this issue May 14, 2024 · 0 comments
Open

Linter - Improve template governance by supporting metadata linting #14096

audhage opened this issue May 14, 2024 · 0 comments
Labels
enhancement New feature or request Needs: Upvote This issue requires more votes to be considered

Comments

@audhage
Copy link

audhage commented May 14, 2024

Is your feature request related to a problem? Please describe.
The metadata keyword is great for improving template governance. We can implement metadata properties like: version or author.
While the existence and formatting of these "properties" are easy to validate programmatically by compiling the template and extracting the properties, we are unable to have rules stating that certain properties are required, and even potentially the formatting of those properties through VS Code.

Describe the solution you'd like

Some options could include:

Require properties

An option in the .bicepconfig linter options where I can specify required metadata properties.

Example:

// bicepconfig.json
{
// ...
  "analyzers": {
    "core": {
      "rules": {
        "required-metadata-properties": {
          "level": "Error",
          "properties": [
            "author",
            "version"
          ]
        }
      }
    }
  }
// ...
}

Require version property

The most important property to have would be the version property. With this option, it could enforce the semver format for the property.

Example:

// bicepconfig.json
{
// ...
  "analyzers": {
    "core": {
      "rules": {
        "require-metadata-version-property": {
          "level": "Error"
        }
      }
    }
  }
// ...
}
@audhage audhage added the enhancement New feature or request label May 14, 2024
@stephaniezyen stephaniezyen added Needs: Upvote This issue requires more votes to be considered and removed Needs: Triage 🔍 labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Needs: Upvote This issue requires more votes to be considered
Projects
Status: Todo
Development

No branches or pull requests

2 participants