Fix Assembly heuristics to remove char class duplication by donno2048 · Pull Request #7265 · github-linguist/linguist · GitHub
Skip to content

Fix Assembly heuristics to remove char class duplication - #7265

Merged
lildude merged 1 commit into
github-linguist:mainfrom
donno2048:patch-1
Mar 5, 2025
Merged

lildude merged 1 commit into
github-linguist:mainfrom
donno2048:patch-1

Conversation

@donno2048

@donno2048 donno2048 commented Mar 4, 2025 •

Copy link
Copy Markdown
Contributor

#7229 introduced changes to the Assembly heuristics that included character class duplication which were reported as warnings in CI but missed at the time:

/home/runner/work/linguist/linguist/lib/linguist/heuristics.rb:91: warning: character class has duplicated range: /^\s+(i?)db\s+[\d\w]/
/home/runner/work/linguist/linguist/lib/linguist/heuristics.rb:91: warning: character class has duplicated range: /(?i-mx:mov\s+[^\s]+,)|(?-mix:^\s+(i?)db\s+[\d\w])/
/home/runner/work/linguist/linguist/lib/linguist/heuristics.rb:91: warning: character class has duplicated range: /^\s+(?i)db\s+[\d\w]/
/home/runner/work/linguist/linguist/lib/linguist/heuristics.rb:91: warning: character class has duplicated range
/home/runner/work/linguist/linguist/lib/linguist/heuristics.rb:129: warning: character class has duplicated range

For future reference, @donno2048, useful PR bodies like this are preferred over simple pings as context is needed for reviewing by those unfamiliar at the time or who question the change in future.

@donno2048
donno2048 requested a review from a team as a code owner March 4, 2025 20:52
@lildude lildude changed the title Fix character class has duplicated range warning Fix Assembly heuristics to remove char class duplication Mar 5, 2025
Comment thread lib/linguist/heuristics.yml
@lildude
lildude added this pull request to the merge queue Mar 5, 2025
Merged via the queue into github-linguist:main with commit ccb32e9 Mar 5, 2025
@donno2048
donno2048 deleted the patch-1 branch March 5, 2025 10:43
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jul 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants