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

[Feature] Automatically discover configuration file(s) in project #276

Open
rock3r opened this issue Aug 23, 2022 · 2 comments
Open

[Feature] Automatically discover configuration file(s) in project #276

rock3r opened this issue Aug 23, 2022 · 2 comments
Labels
feature New feature or request

Comments

@rock3r
Copy link
Contributor

rock3r commented Aug 23, 2022

When opening a project for the first time, the plugin could scan the project files to see if there are any files that look like baseline (xml with a certain schema) or detekt config file(s) (yml files, likely with "detekt" in their name). If those are not configured in the plugin settings, the plugin could pop up a notification prompting the user to automatically add them to the settings. If the user accepts, the settings screen would then be opened with the new values in, and the user can confirm, modify the preset values, or cancel.

@arturbosch arturbosch added the feature New feature or request label Aug 24, 2022
@Glennmen
Copy link

This is something that I missed the past weeks when adding Detekt to multiple projects. I had to add the Detekt config for each project manually in the plugin settings.
Would be very nice if the plugin had the same behaviour as the Gradle plugin. By default it will look in config/detekt/detekt.yml

@TWiStErRob
Copy link
Member

Agreed, but here's a tip: version-control .idea/detekt.xml

There isn't anything project specific, so you can copy between projects.

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="DetektPluginSettings">
    <option name="configurationFilePaths">
      <set>
        <option value="$PROJECT_DIR$/config/detekt/detekt.yml" />
      </set>
    </option>
    <option name="enableAllRules" value="true" />
  </component>
</project>

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

No branches or pull requests

4 participants