checkstyle / eclipse-cs

The Eclipse Checkstyle plug-in integrates the Checkstyle Java code auditor into the Eclipse IDE. The plug-in provides real-time feedback to the user about violations of rules that check for coding style and possible error prone code constructs.
https://checkstyle.org/eclipse-cs
GNU Lesser General Public License v2.1
97 stars 56 forks source link

Cannot easily delete / fix an incorrect link to a checkstyle.xml file #700

Open leerho opened 3 months ago

leerho commented 3 months ago

Configuration

Using Eclipse IDE for Java 2024-03 (4.31.0) Build id: 20240307-1437

Running on Apple MacBook Pro, Apple M1 Pro chip, macOS Sonoma 14.4.1

Description / Steps to Reproduce

I accidentally inserted an incorrect location for a checkstyle.xml file, which I discovered later. But it is incredibly difficult to fix it.

Steps to Reproduce:

The Check Configuration "\<file name>" is currently in use by a project. It must be removed from all project configurations before it can be deleted.

I tried deactivating checkstyle in the two projects (the only two). I also unclicked the box "Checkstyle active for each project". None of this allowed me to simply correct the path to the xml file. I didn't know what else to do to remove Checkstyle from being used.

Finally, after trying all kinds of things I tried this:

Yes, I did finally figure out how to fix it. So what is the problem?

  1. It is inordinately complicated to simply fix an incorrect path!

  2. The error message words: "The Check Configuration "\<file name>" is currently in use by a project" led me down a rat-hole trying to "deactivate" its use at the project level.

  3. The error message words "It must be removed from all project configurations before it can be deleted." also led me to look at where at the project level I activated checkstyle.

  4. What I would suggest is when the checkstyle code figures out that the path is incorrect display an error message something like this:

The current configuration file \<blah> cannot be found. Correct this by choosing and applying any valid configuration (e.g, default) from the Main dialog and then return to the Local Check Configuration menu to delete the incorrect one, and then create a new Check Configuration.

Even better: find an even easier way to fix a broken or invalid path to the xml file!

leerho commented 3 months ago

It was closed in eclipse-packaging/packages because this issue belongs here.