Skip to content

refactor: moves code related to AST from rule.utils into astutils package #1380

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

Merged
merged 4 commits into from
May 26, 2025

Conversation

chavacava
Copy link
Collaborator

Modifications summary:

  1. Moves AST-related functions from rule/utils.go to astutils/ast_utils.go (+ modifies function calls)
  2. Renames some of these AST-related functions
  3. Avoids instantiating a printer config at each call to astutils.GoFmt
  4. Uses astutils.IsIdent and astutils.IsPkgDotName when possible

@chavacava chavacava merged commit 92f28cb into master May 26, 2025
8 checks passed
@chavacava chavacava deleted the rule_utils_refactoring branch May 26, 2025 11:18
Copy link
Contributor

@ccoVeille ccoVeille left a comment

Choose a reason for hiding this comment

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

Great idea

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.

3 participants