fix: fix update-rule-manifest CI and gen-rule-manifest script#457
fix: fix update-rule-manifest CI and gen-rule-manifest script#457
Conversation
- Fix shell operator precedence in workflow causing inverted trigger logic - Add internal/rules/ to workflow grep pattern for core rule detection - Fix includeRegex to match all test directories (eslint, eslint-plugin-import, typescript-eslint) - Fix getSkipCases to resolve test files from correct directory per rule group - Enable 12 additional passing tests and add their snapshots - Regenerate rule-manifest.json with corrected script
Summary of ChangesHello @fansenze, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on enhancing the reliability and accuracy of the rule manifest generation process. It addresses several bugs in the Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces several important fixes to the update-rule-manifest CI workflow and the gen-rule-manifest.js script. The changes correctly address issues with shell operator precedence, grep patterns, and hardcoded paths, making the rule manifest generation process more robust and maintainable. Enabling a significant number of previously skipped tests is also a great step forward. I have one suggestion to further improve the robustness of the script's regular expression for parsing test paths.
Summary
Fix several bugs in the
update-rule-manifestCI workflow andscripts/gen-rule-manifest.js:grep ... || echo '' > filehad inverted logic due to operator precedence, causing the script to run when there were NO rule changes and skip when there WERE changes. Replaced with$GITHUB_OUTPUTbased approach.internal/plugins/, missing core rules underinternal/rules/. Now matches both.includeRegex: Only matchedtests/eslint-plugin-import/andtests/typescript-eslint/paths, missingtests/eslint/for core rules. Also incorrectly matched commented-out lines. Now uses a generic pattern with^anchor andmflag.getSkipCases: Hardcoded to only look intypescript-eslinttest directory. Now dynamically resolves the test directory based on the rule's group viagroupToTestDir().Additionally, enabled 12 tests that were previously commented out but now pass:
default-param-last,no-duplicate-enum-values,no-mixed-enums,no-this-alias,no-unsafe-argument,no-unsafe-enum-comparison,no-unsafe-unary-minus,prefer-as-const,prefer-reduce-type-parameter,prefer-return-this-type,related-getter-setter-pairs,require-awaitRegenerated
rule-manifest.jsonwith the fixed script (93 rules total: 32 full, 1 partial-impl, 60 partial-test).Related Links
N/A
Checklist