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

[FR]: Improve checkstyle to support different checkstyle.xml configs in a repo #454

Open
nlou9 opened this issue Dec 23, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@nlou9
Copy link
Contributor

nlou9 commented Dec 23, 2024

What is the current behavior?

Checkstyle does not automatically take the nearest configuration file for different modules. We need to explicitly specify the configuration file for each module in your build tool configuration.

Describe the feature

checkstyle could handle different configuration files for different modules in one repo.

@nlou9 nlou9 added the enhancement New feature or request label Dec 23, 2024
@nlou9
Copy link
Contributor Author

nlou9 commented Dec 23, 2024

We started an initial discussion around this in this thread. https://bazelbuild.slack.com/archives/C04281DTLH0/p1724430549456359

@nlou9
Copy link
Contributor Author

nlou9 commented Jan 16, 2025

Hey @alexeagle , after talked with @fzakaria, we have an initial thought about this request.

To apply different Checkstyle configuration files to different modules, we could modify the checkstyle_action to accept a configuration map (key: module name, value: configuration file) instead of a single configuration file. Then, we can parse the source file prefixes to determine the module name and retrieve the corresponding configuration file. We have not tested this approach yet and would appreciate your suggestions.

@nlou9
Copy link
Contributor Author

nlou9 commented Jan 21, 2025

I open this PR #464 . Look forward to your feedback. @alexeagle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant