jshiell / checkstyle-idea

CheckStyle plug-in for IntelliJ IDEA
https://plugins.jetbrains.com/plugin/1065-checkstyle-idea
Other
889 stars 161 forks source link

global configuration of local paths #636

Closed xenoterracide closed 7 months ago

xenoterracide commented 7 months ago

I want a way to not have to go in and configure checkstyle for every single project.

I use gradle, I imagine that you could hook into the tooling api to get the location of the configs for the declared source set. looking at your configuration options you actually only support 2, and I commonly have 3... main, testFixtures, and test. For which I commonly have 2 checkstyle configurations, main.xml and test.xml although maybe I should have all 3... basically it's progressive steps in relaxing the config because I don't need or want the strictness in tests.

I do have a common convention for where I personally put my files <root>/.config/checkstyle/<main|test|etc>.xml

All I'm really asking for is the ability to configure a if a repo has a file at this location relative to its root, go ahead and use it. So that every time I set up one of my own projects, it's just auto-magically done. Projects that don't use the location I configure should just softly not use it. If they're added there later it should pick them up.

jshiell commented 7 months ago

Dup of #618. TL;DR I'm wary due to edge cases.