Skip to content

Disable linter rule "Maximum number of variables used" when the file does not contain declarations used in files meant to deployed and variables are exported - #17149

Merged
Jonny Eskew (jeskew) merged 2 commits into
Azure:mainfrom
GABRIELNGBTUC:feature/max-variables-linter-ignored-for-library
May 14, 2025

Conversation

@GABRIELNGBTUC

@GABRIELNGBTUC GABRIELNGBTUC commented May 14, 2025 •

Copy link
Copy Markdown
Contributor

Description

Fixes #15456

The linter rule "Maximum number of variables used" is modified to ignore a file containing more than 512 variables when:

  • No param, output, resource and module declarations are present in the file
  • At least one variable in the file is exported

Checklist

Microsoft Reviewers: Open in CodeFlow

…do not contain declarations used in ARM files meant to be deployed and that exports at least one variable
… is correctly triggered when variables are exported but any of "param", "output", "resource" or "module" are present in the same file
@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented May 14, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 9.37%. Comparing base (108d816) to head (d719edc).
⚠️ Report is 3920 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (108d816) and HEAD (d719edc). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (108d816) HEAD (d719edc)
dotnet 4 0
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #17149       +/-   ##
===========================================
- Coverage   94.28%    9.37%   -84.91%     
===========================================
  Files        1113        7     -1106     
  Lines      100791      288   -100503     
  Branches     8734      123     -8611     
===========================================
- Hits        95028       27    -95001     
+ Misses       4595      261     -4334     
+ Partials     1168        0     -1168     
Flag Coverage Δ
dotnet ?
typescript 9.37% <ø> (+1.66%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1100 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jeskew
Jonny Eskew (jeskew) merged commit 36926b3 into Azure:main May 14, 2025
@jeskew

Copy link
Copy Markdown
Contributor

Thanks for your contribution, GABRIELNGBTUC !

@github-actions

Copy link
Copy Markdown
Contributor

Test this change out locally with the following install scripts (Action run 15029384224)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 15029384224
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 15029384224"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 15029384224
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 15029384224"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Variable count linter should be disabled for "library" modules

3 participants