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

Support different configuration files for different modules based on the location of the configuration file #16258

Closed
nlou9 opened this issue Jan 28, 2025 · 1 comment

Comments

@nlou9
Copy link

nlou9 commented Jan 28, 2025

How it works Now:
The checkstyle configuration files need to be passed with -c flag.

New Feature

In some scenarios, different modules require different configuration files. We need to create different checkstyle.xml files for different directories. It would be helpful if the tool could automatically find the nearest ancestor, like most other linting tools.

In our case, we use Bazel rules_lint with checkstyle tools. We need this workaround, as the tool does not handle it by itself.

@romani
Copy link
Member

romani commented Jan 31, 2025

This repository is checkstyle library, not a final solution for anyone.

Due to history, this repository host Ant tasks to let users integrate to ANT build system.

CLI exists specifically for testing purposes and quick runs, or whatever you can do with it simple usage, not really was intended to be API.

You do integration to Bazel, ok, CLI is not enough for you, you should use our API to integrate as you want.

automatically find the nearest ancestor

This is very vague request, it means something special for your use case. It is ok, please implement this automatically find the nearest ancestor in your integration, as it makes sense only in Bazel or only in your extension.

In each folder you will apply your special logic to find checkstyle config, as you find it, run checkstyle on target folder or files with target config, save results in whatever place your extension expects.

Issue is closed.
Discussion can continue to help to use API

@romani romani closed this as completed Jan 31, 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

No branches or pull requests

2 participants