Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_js_analyzer): rule useValidLang #4045

Merged
merged 3 commits into from
Dec 19, 2022
Merged

Conversation

ematipico
Copy link
Contributor

Summary

Closes #3948

I added a new AriaIso struct that exposes some utility function to check if a country/language is valid.

The diagnostics are different from the old rule. The old rules used to do a combination of <LANGUAGE>-<COUNTRIES> when given possible valid suggestions. Here I decided to keep it dumber and to just suggest the correct language when it's wrong, and then the correct countries if the country isn't correct.

Test Plan

Added some test cast

@ematipico ematipico requested review from leops, xunilrj and a team as code owners December 12, 2022 15:48
@netlify
Copy link

netlify bot commented Dec 12, 2022

Deploy Preview for docs-rometools ready!

Name Link
🔨 Latest commit 8bb66de
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/63a046a7acba6d0008ad0423
😎 Deploy Preview https://deploy-preview-4045--docs-rometools.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Dec 12, 2022

Parser conformance results on ubuntu-latest

js/262

Test result main count This PR count Difference
Total 48647 48647 0
Passed 47582 47582 0
Failed 1065 1065 0
Panics 0 0 0
Coverage 97.81% 97.81% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6093 6093 0
Passed 1754 1754 0
Failed 4339 4339 0
Panics 0 0 0
Coverage 28.79% 28.79% 0.00%

ts/babel

Test result main count This PR count Difference
Total 639 639 0
Passed 562 562 0
Failed 77 77 0
Panics 0 0 0
Coverage 87.95% 87.95% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 16740 16740 0
Passed 12814 12814 0
Failed 3926 3926 0
Panics 0 0 0
Coverage 76.55% 76.55% 0.00%

@ematipico ematipico merged commit 08ceeb5 into main Dec 19, 2022
@ematipico ematipico deleted the feat/use-valid-lang branch December 19, 2022 11:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Linter Area: linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useValidLang
3 participants