Azure / Azure/bicep

Add (an) "expression could be simplified" linter(s)

Open
#13,108 0 comments 0 reactions 0 assignees View on GitHub
enhancement Needs: Upvote story: linter rules
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.**
A Bicep expression may be technically correct but indirect or inefficient (e.g., ` || true` or ` ?? null` or `contains(obj, 'property') ? obj.property : null`).

**Describe the solution you'd like**
One or more linters could scan for known patterns and propose fixes, similar to [Roslyn linters in the "Unnecessary code rules" category](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/language-rules#expression-level-preferences).

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the requested simplification patterns in the issue and the linked Roslyn “Unnecessary code rules” category. Define the linter scope, supported diagnostics, and proposed fixes before identifying the relevant Bicep analysis entry points; done means the selected patterns are detected consistently and their fixes are validated.

Written by the indexing model from the issue text.

Assessment

Domain
compilers, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.