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

Add analysis rule to check regex pattern validity #4904

Merged
merged 2 commits into from Dec 28, 2022

Conversation

twschiller
Copy link
Contributor

@twschiller twschiller commented Dec 28, 2022

What does this PR do?

  • Adds analysis engine rule to check regex validity
  • Checks that literal is a valid regex (regex can compile)
  • Checks that the regex contains at least one named group

Demo

Checklist

  • Add tests
  • Designate a primary reviewer: @BLoe

@codecov
Copy link

codecov bot commented Dec 28, 2022

Codecov Report

Merging #4904 (6a68819) into main (a06cbe5) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #4904      +/-   ##
==========================================
+ Coverage   55.17%   55.22%   +0.05%     
==========================================
  Files         954      955       +1     
  Lines       28451    28486      +35     
  Branches     5448     5459      +11     
==========================================
+ Hits        15697    15732      +35     
  Misses      12754    12754              
Impacted Files Coverage Δ
src/analysis/analysisVisitors/regexAnalysis.ts 100.00% <100.00%> (ø)
src/pageEditor/analysisManager.ts 88.46% <100.00%> (+0.46%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@twschiller twschiller changed the title Add analysis rule to check regex validity Add analysis rule to check regex pattern validity Dec 28, 2022
@github-actions
Copy link

When the PR is merged, the first loom link found on this PR will be posted to #sprint-demo on Slack. Do not edit this comment manually.

@twschiller twschiller merged commit d2dde82 into main Dec 28, 2022
@twschiller twschiller deleted the feature/regex-analysis branch December 28, 2022 18:01
@twschiller twschiller added this to the 1.7.16 milestone Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants