spotless icon indicating copy to clipboard operation
spotless copied to clipboard

feat: add execution ID parameter to failing spotless check log

Open dpolivaev opened this issue 7 months ago • 2 comments

for improved error messaging, issue #1988

  • Introduced a new parameter executionId to capture the execution ID from Maven's configuration.
  • Updated error messages to include the execution ID when suggesting commands to fix format violations.
  • Enhanced test cases to validate the new behavior of error messages based on the execution ID.

dpolivaev avatar May 20 '25 10:05 dpolivaev

Maven always adds an execution id even if it is not configured in the pom file. I used a debugger and implemented a heuristic better separating user specified execution ids from maven generated ones. Now I assume execution id "default" or starting with "default-" like "default-cli" to be automatically added and do not mention them in the generated output. Unfortunately, I have not found a direct access to the xml after it was processed by the maven xml parser because the parser does not generate any DOM.

dpolivaev avatar May 21 '25 11:05 dpolivaev

This needs a spotlessApply, but once CI passes this LGTM. Before I merge, I'd like one of our established maven contributors to give it a thumbs-up first. I am not maven-literate-enough to understand the debate above. I'll publish a set of releases once this either gets merged or rejected.

nedtwigg avatar May 21 '25 16:05 nedtwigg

I'm open to merging this, but it needs to pass CI, and it needs signoff from an existing maven contributor.

nedtwigg avatar Sep 23 '25 06:09 nedtwigg