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

Multiple configuration files are not supported #117

Closed
marco-eckstein opened this issue Mar 22, 2021 · 3 comments · Fixed by #240
Closed

Multiple configuration files are not supported #117

marco-eckstein opened this issue Mar 22, 2021 · 3 comments · Fixed by #240
Labels
feature New feature or request

Comments

@marco-eckstein
Copy link

detekt supports multiple configuration files, but the plugin only supports one. I have split my detekt configuration into multiple files: one shared across all projects and one project-specific. So, I cannot use the plugin.

@cortinico cortinico added the feature New feature or request label Mar 22, 2021
@MarcusWolschon
Copy link

Yes, project specific Detekt config is a must.
Just like Lint and code style are project specific.

@arturbosch
Copy link
Member

arturbosch commented Jun 27, 2022

Multiple configuration files are supported by using a path separator char like

Screenshot from 2022-06-27 18-31-44

Unfortunately the file chooser for the config file does not support choosing multiple files for now (PRs welcome).

@stenzengel
Copy link

Since the file path separator is Windows/Linux specific (for Windows a semicolon and for Linux a colon must be used), this causes a problem, if we would like to commit the file .idea/detekt.xml in Git (even if the folder .idea is Git-ignored) to share the configuration of the Detekt plugin (in addition to the Detekt rules).

The cause seems to be path.trim().split(File.pathSeparator) in ProjectUtils.extractPaths. Could this be changed to a way which works for both operating systems?

(Only the colon/semicolon difference causes problems, using slash on Windows systems is not a problem.)

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

Successfully merging a pull request may close this issue.

5 participants