checkstyle-idea icon indicating copy to clipboard operation
checkstyle-idea copied to clipboard

Copy libraries from project directory functionality seems not working

Open remal opened this issue 2 years ago • 5 comments

We have a custom checkstyle-extensions.jar at the root of our project.

Our .idea/checkstyle-idea.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="CheckStyle-IDEA">
    <option name="configuration">
      <map>
        <entry key="active-configuration" value="PROJECT_RELATIVE:C:/Users/remal/project/checkstyle.xml:Project checkstyle" />
        <entry key="checkstyle-version" value="9.3" />
        <entry key="copy-libs" value="true" />
        <entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
        <entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
        <entry key="location-2" value="PROJECT_RELATIVE:C:/Users/remal/project/checkstyle.xml:Project checkstyle" />
        <entry key="scan-before-checkin" value="false" />
        <entry key="scanscope" value="JavaOnlyWithTests" />
        <entry key="suppress-errors" value="true" />
        <entry key="thirdparty-classpath" value="$PROJECT_DIR$/checkstyle-extensions.jar" />
      </map>
    </option>
  </component>
</project>

When we change checkstyle-extensions.jar we see that this file is locked by a Java process, that's why I think "Copy libraries from project directory" functionality isn't working.

Are there any ideas? How can I debug this functionality myself?

Operation system: Windows Project path: C:\Users\remal\project

remal avatar Feb 17 '22 08:02 remal

The copy libraries feature only deals with the module classpath, which is basically the libraries your application uses.
If you also want your third-party Checkstyle addons outside the project, you must simply place them outside the project. 😄

tsjensen avatar Feb 17 '22 10:02 tsjensen

We commit third-party checks in our Git repository. Is it possible to copy them too?

remal avatar Feb 17 '22 11:02 remal

It's not at present, support would need to be added. We know the paths, so it shouldn't be too hard in principle.

jshiell avatar Feb 18 '22 10:02 jshiell

Sorry if I didn't understand you correctly. If it's not so hard, are you going to implement it?

remal avatar Feb 21 '22 09:02 remal

No current plans myself, given I don't have a Windows machine to test on, nor much inclination to work on this. But it should be easy enough in principle if someone wants to submit a PR.

jshiell avatar Feb 21 '22 09:02 jshiell