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

fix(xtask): enforce a stable ordering for the generated imports of lint rules #2695

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

leops
Copy link
Contributor

@leops leops commented Jun 10, 2022

Summary

The cargo codegen analyzer command automatically generates imports for all the files in the analyzers and assists directories, but the ordering of the imports in the generated files depends on the order they are returned by the underlying filesystem. This order isn't stable and may change depending on the operating system, which leads to unnecessary merge conflicts for pull requests that add lint rules as the auto-generated files get modified every time the codegen script is run. This PR fixes the issue by modifying the script to sort the lint rules by their name in the resulting generated code.

@leops leops temporarily deployed to aws June 10, 2022 09:41 Inactive
@github-actions
Copy link

Parser conformance results on ubuntu-latest

js/262

Test result main count This PR count Difference
Total 45878 45878 0
Passed 44938 44938 0
Failed 940 940 0
Panics 0 0 0
Coverage 97.95% 97.95% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 39 39 0
Passed 36 36 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.31% 92.31% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 5946 5946 0
Passed 350 350 0
Failed 5596 5596 0
Panics 0 0 0
Coverage 5.89% 5.89% 0.00%

ts/babel

Test result main count This PR count Difference
Total 588 588 0
Passed 519 519 0
Failed 69 69 0
Panics 0 0 0
Coverage 88.27% 88.27% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 16257 16257 0
Passed 12391 12391 0
Failed 3866 3866 0
Panics 0 0 0
Coverage 76.22% 76.22% 0.00%

@github-actions
Copy link

@leops leops merged commit 2396eca into main Jun 10, 2022
@leops leops deleted the fix/codegen-analyze-sort branch June 10, 2022 12:37
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.

None yet

2 participants