Skip to content

refactor: string-format implements ConfigurableRule #1251

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

Conversation

alexandear
Copy link
Collaborator

@alexandear alexandear commented Feb 25, 2025

The PR refactors the implementation of the string-format rule. This rule has a configuration, so it should implement the rule.ConfigurableRule interface.

Benefits of the refactoring

  • Removed the workaround StringFormatRule.ParseArgumentsTest.
  • Made this rule consistent with others that have a configuration.

@alexandear alexandear changed the title refactor: string-format implement ConfigurableRule refactor: string-format implements ConfigurableRule Feb 25, 2025
@alexandear alexandear force-pushed the refactor/string-format-configure branch from 7a86942 to 7708dec Compare February 25, 2025 19:24
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.

Thanks for this

@ccoVeille
Copy link
Contributor

I wonder how far we are to remove the second argument from Apply interface

@alexandear
Copy link
Collaborator Author

I wonder how far we are to remove the second argument from Apply interface

We can do this refactoring in revive v2.

@chavacava chavacava merged commit 77f4474 into mgechev:master Feb 26, 2025
16 checks passed
@alexandear alexandear deleted the refactor/string-format-configure branch February 26, 2025 21:29
mfederowicz pushed a commit to mfederowicz/revive that referenced this pull request Apr 18, 2025
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