Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize processors #595

Merged
merged 7 commits into from
Feb 5, 2025
Merged

Generalize processors #595

merged 7 commits into from
Feb 5, 2025

Conversation

emdoyle
Copy link
Member

@emdoyle emdoyle commented Feb 4, 2025

This PR builds directly on #586

While that PR introduced the concepts of both the FileProcessor and FileChecker, it was primarily concerned with the FileChecker, composing logic from multiple checkers to produce a final stream of diagnostics.

This PR is focused on FileProcessor, and more specifically with generalizing the FileModule intermediate representation which they produce. This means:

  • Cleanly separating ignore directive parsing from import parsing (remove NormalizedImports combination object)
  • Creating the Dependency enum which can hold imports as well as other types of source code references
  • Consolidating the FileModule type to be used across both pipelines, removing marker types
  • Pushing low-level import parsing details into specific processors rather than in the high-level pipeline

@emdoyle emdoyle marked this pull request as ready for review February 4, 2025 19:24
Base automatically changed from generalize-checks to main February 5, 2025 21:42
@emdoyle emdoyle merged commit 8592ea1 into main Feb 5, 2025
1 of 4 checks passed
@emdoyle emdoyle deleted the generalize-processors branch February 5, 2025 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant