Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pt] Fix hexadecimal number bug #10601

Merged
merged 3 commits into from
May 20, 2024
Merged

Commits on May 20, 2024

  1. Fix logic of the RegexAntiPatternFilter

     - by doing `if (matcher.find())` we were only ever checking the first
       match within a single text sample;
    
     - changing it from an `if` block to a `while` loop means that, so long
       as there are instances to find, we will continue comparing them
       with those in the actual rule match object;
    
     - this bug affected any usage of RegexAntiPatternFilter where the rule
       regexp pattern matched multiple times in the same sentence.
    p-goulart committed May 20, 2024
    Configuration menu
    Copy the full SHA
    29d9580 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    99fb79a View commit details
    Browse the repository at this point in the history
  3. [pt] Fix multiplication sign rule logic

     - the tailing letters (usually measurement unit abbreviations) must be
       present in the regexp if we want the regexp antipattern to function
       properly;
    
     - add a couple of examples testing hex numbers;
    
     - add a couple of speller rule tests to drive the point home.
    p-goulart committed May 20, 2024
    Configuration menu
    Copy the full SHA
    e23cdb8 View commit details
    Browse the repository at this point in the history