ma
marcoroth
GitHub
herb
Workspace
GitHub
CI Pipeline Executions
Filtered
Runs
Demo
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
Overview
⌘K
herb
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
main
02864bcf Linter: Don't report duplicate strict locals diagnostics (#2252) A strict locals declaration in a non-partial file was reported twice. `erb-strict-locals-comment-syntax` carried its own partial-only check, and `actionview-strict-locals-partial-only` reports the same thing for Action View projects, so a single `<%# locals: (user:) %>` in `app/views/users/show.html.erb` produced two offenses that say the same thing in different words. `erb-strict-locals-comment-syntax` is about the syntax of the declaration, so the partial-only check is dropped from it and the Rails-specific diagnostic stays in `actionview-strict-locals-partial-only`, where it is already framework-gated and autocorrectable. The same overlap existed one level down. `<% # locals: (user:) %>` was flagged by both `erb-comment-syntax`, for the generic "use `<%#` instead of `<% #`" reason, and by `erb-strict-locals-comment-syntax`, which has a dedicated message explaining that only ERB comment syntax is recognized for strict locals. `erb-comment-syntax` now skips content that looks like a locals declaration and leaves it to the more specific rule. The two helpers that recognize such a declaration, `extractRubyCommentContent` and `looksLikeLocalsDeclaration`, move to a shared `strict-locals-utils.ts` so both rules use the same definition. Resolves #2236 --------- Co-authored-by: Marco Roth <marco.roth@intergga.ch>
by AG0708
A
Previous
Next