Skip to content

fix: fix update-rule-manifest CI and gen-rule-manifest script#457

Merged
fansenze merged 2 commits intomainfrom
fix/update-rule-manifest
Feb 5, 2026
Merged

fix: fix update-rule-manifest CI and gen-rule-manifest script#457
fansenze merged 2 commits intomainfrom
fix/update-rule-manifest

Conversation

@fansenze
Copy link
Copy Markdown
Contributor

@fansenze fansenze commented Feb 5, 2026

Summary

Fix several bugs in the update-rule-manifest CI workflow and scripts/gen-rule-manifest.js:

  • Workflow shell operator precedence: The original grep ... || echo '' > file had 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_OUTPUT based approach.
  • Workflow grep pattern: Only matched internal/plugins/, missing core rules under internal/rules/. Now matches both.
  • includeRegex: Only matched tests/eslint-plugin-import/ and tests/typescript-eslint/ paths, missing tests/eslint/ for core rules. Also incorrectly matched commented-out lines. Now uses a generic pattern with ^ anchor and m flag.
  • getSkipCases: Hardcoded to only look in typescript-eslint test directory. Now dynamically resolves the test directory based on the rule's group via groupToTestDir().

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-await

Regenerated rule-manifest.json with the fixed script (93 rules total: 32 full, 1 partial-impl, 60 partial-test).

Related Links

N/A

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

- 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
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @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 update-rule-manifest CI workflow and the gen-rule-manifest.js script, which are crucial for maintaining up-to-date rule status. The fixes involve correcting shell operator precedence, improving rule detection patterns to include core ESLint rules, and enabling dynamic resolution of test directories. A direct benefit of these improvements is the activation of 12 previously disabled tests, leading to a more comprehensive and reliable rule-manifest.json.

Highlights

  • CI Workflow Logic Correction: Resolved an operator precedence issue in the update-rule-manifest CI workflow, ensuring the script correctly identifies and processes rule changes by switching to a $GITHUB_OUTPUT based approach.
  • Improved Rule Manifest Generation Script: Enhanced scripts/gen-rule-manifest.js to accurately detect rule test files across different plugin groups (e.g., @typescript-eslint, eslint) and dynamically determine test file paths for skip case analysis. This includes fixing the grep pattern and includeRegex to cover core rules and avoid commented-out lines.
  • Enabled Additional Tests: Unblocked and enabled 12 previously commented-out tests for various TypeScript ESLint rules, including 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, and require-await.
  • Regenerated Rule Manifest: Updated rule-manifest.json to reflect the accurate status of 93 rules (32 full, 1 partial-impl, 60 partial-test) based on the corrected script logic and newly enabled tests.
Changelog
  • packages/rslint-test-tools/rstest.config.mts
    • Uncommented 12 specific TypeScript ESLint rule tests, including 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, and require-await.
  • packages/rslint-test-tools/rule-manifest.json
    • Updated the status of numerous rules from 'full' to 'partial-test' or 'full' based on the corrected script logic and newly enabled tests.
    • Added entries for no-array-constructor, no-inferrable-types, no-loss-of-precision, no-misused-new, no-sparse-arrays, no-template-curly-in-string, and prefer-readonly rules with their respective statuses.
  • scripts/gen-rule-manifest.js
    • Refactored TESTS_DIR to TESTS_BASE_DIR to support multiple test groups.
    • Introduced groupToTestDir function for dynamic test directory mapping (e.g., @typescript-eslint to typescript-eslint).
    • Modified getIncludedRules's includeRegex to correctly parse rule paths from all test groups and ignore commented lines.
    • Updated getSkipCases to use the new groupToTestDir function, removing hardcoded test directory paths.
    • Adjusted buildManifest to pass the rule group to getSkipCases.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/update-rule-manifest.yml
Activity
  • No specific human activity (comments, reviews, etc.) has been recorded for this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@fansenze fansenze merged commit 840bd66 into main Feb 5, 2026
14 checks passed
@fansenze fansenze deleted the fix/update-rule-manifest branch February 5, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants