Skip to content

sqf: S41 - Skip forEach that are assigned to a variable - #1287

Open
PabstMirror wants to merge 3 commits into
mainfrom
forEachAss
Open

sqf: S41 - Skip forEach that are assigned to a variable#1287
PabstMirror wants to merge 3 commits into
mainfrom
forEachAss

Conversation

@PabstMirror

Copy link
Copy Markdown
Collaborator

skips x = { _x + 1 } forEach [1, 2, 3];
not perfect, will miss forEachs going directly into commands and last statement in a code block,
but I think this should cover most of the actual times we use the return value of forEach

and the suggestion can then be suppressed by just assigning it to a var

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.6%. Comparing base (c61e0c0) to head (6bb5d57).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
Files with missing lines Coverage Δ
libs/sqf/src/analyze/lints/s41_foreach_apply.rs 71.1% <100.0%> (+0.5%) ⬆️

... and 6 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.

Comment thread libs/sqf/src/analyze/lints/s41_foreach_apply.rs Outdated
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.

2 participants