Skip to content

Comments

refactor(linter_codegen): split into separate files#13657

Merged
graphite-app[bot] merged 1 commit intomainfrom
09-10-refactor_linter_codegen_split_into_separate_files
Sep 11, 2025
Merged

refactor(linter_codegen): split into separate files#13657
graphite-app[bot] merged 1 commit intomainfrom
09-10-refactor_linter_codegen_split_into_separate_files

Conversation

@camchenry
Copy link
Member

@camchenry camchenry commented Sep 10, 2025

Pure refactoring. Just splitting up the linter codegen into individual files to make it a little more organized. This will make it easier to add more "detectors" (I guess that's what we'll call them for now) for additional types of syntax for generating rule runner impls.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Sep 10, 2025
Copy link
Member Author

camchenry commented Sep 10, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camchenry camchenry force-pushed the 09-10-refactor_linter_codegen_split_into_separate_files branch from d0b309f to ab01e3a Compare September 11, 2025 13:32
@camchenry camchenry marked this pull request as ready for review September 11, 2025 13:43
Copilot AI review requested due to automatic review settings September 11, 2025 13:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Pure refactoring to split the linter codegen into separate modules for better organization and to enable easier addition of new "detectors" for rule runner implementation generation.

  • Split a monolithic file into organized modules (utils, rules, node_type_set, if_else_detector)
  • Moved utility functions, rule parsing logic, and node type detection into dedicated modules
  • Updated imports and visibility modifiers to support the new modular structure

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tasks/linter_codegen/src/main.rs Removed large chunks of code that were moved to separate modules and updated imports
tasks/linter_codegen/src/utils.rs New module containing utility functions for AST parsing and rule analysis
tasks/linter_codegen/src/rules.rs New module containing rule entry definitions and rule parsing logic
tasks/linter_codegen/src/node_type_set.rs New module containing the NodeTypeSet struct and its methods
tasks/linter_codegen/src/if_else_detector.rs New module containing the IfElseKindDetector for analyzing if-else patterns

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@camchenry camchenry requested a review from camc314 September 11, 2025 13:45
@camc314 camc314 self-assigned this Sep 11, 2025
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Sep 11, 2025
Copy link
Contributor

camc314 commented Sep 11, 2025

Merge activity

Pure refactoring. Just splitting up the linter codegen into individual files to make it a little more organized. This will make it easier to add more "detectors" (I guess that's what we'll call them for now) for additional types of syntax for generating rule runner impls.
@graphite-app graphite-app bot force-pushed the 09-10-refactor_linter_codegen_split_into_separate_files branch from ab01e3a to 53f5218 Compare September 11, 2025 13:48
@graphite-app graphite-app bot merged commit 53f5218 into main Sep 11, 2025
17 checks passed
@graphite-app graphite-app bot deleted the 09-10-refactor_linter_codegen_split_into_separate_files branch September 11, 2025 13:52
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants