JS-2274 Add SCSS-aware css:S4662 analysis - #7780
jdkandersson wants to merge 14 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
Ruling ReportNew issues flagged (1 issue)S4662 1 | @use 'variables'; /* No FP */
2 |
> 3 | @@media {
4 | display: none;
5 | }Ruling passed with these expected-result updates already present in the branch. No fix PR was needed. |
4eb465b to
04cfb3e
Compare
Generated with GitHub Actions
Generated with GitHub Actions
| config, | ||
| }; | ||
|
|
||
| await sonarRulesReady; |
There was a problem hiding this comment.
💡 Edge Case: sonarRulesReady rejection bypasses APIError wrapping
await sonarRulesReady at wrapper.ts:98 sits outside the .catch attached to stylelint.lint(...), so if the module-level ruleReady promise (built from stylelint.rules[UPSTREAM_RULE]) ever rejects, lint() throws a raw error instead of the wrapped APIError.linterError, and the module-level promise can also surface as an unhandled rejection if lint() is never called. This is unlikely for a built-in stylelint rule, but wrapping the await (e.g. try/catch converting to APIError) would keep failure handling consistent.
Was this helpful? React with 👍 / 👎
Code Review 👍 Approved with suggestions 2 resolved / 3 findingsAdds SCSS-aware css:S4662 analysis with independent targeting for plain CSS and SCSS, addressing the Sass filter and warning suppression findings. Consider ensuring the sonarRulesReady rejection wraps APIError properly. 💡 Edge Case: sonarRulesReady rejection bypasses APIError wrapping📄 packages/analysis/src/css/linter/wrapper.ts:98-107 📄 packages/analysis/src/css/rules/S8757/rule.ts:25-27 📄 packages/analysis/src/css/rules/index.ts:28
✅ 2 resolved✅ Edge Case: Sass filter suppresses warnings when block source range is incomplete
✅ Edge Case: Sass-only warning inside a complete non-Sass block not suppressed
🤖 Prompt for agentsOptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |





Summary
Verification
Related