Uh oh!
There was an error while loading. Please reload this page.
mvn spotless:apply now prints out statistics - #1507
Conversation
I would categorize it like this: I think the PR as-is would be confusing because the first run would say that "100 files were considered" and after a few runs it would say "0 files were considered". The files were considered, a thorough up-to-date check showed that they were already clean :) |
blacelle
commented
Jan 28, 2023
Here is another step forward. I introduce a Formatter.name property that I'm not 100% comfortable with. The log now looks like: I was keen to add the equivalent log in Gradle, but I'm too weak in Gradle. If this is a relevant improvment, I would appreciate a pointer to do so. |
nedtwigg
left a comment
There was a problem hiding this comment.
Thanks for the change, it's close to mergeable.
Re: the Gradle plugin, it's tough because the up-to-date checking happens within the gradle machinery, and I'm not aware of a way to get a count of how many were skipped due to up-to-date checking. Regardless, they're not coupled, so it can always be added later.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
nedtwigg
left a comment
There was a problem hiding this comment.
LGTM. Add an entry under ###Added in plugin-maven/CHANGELOG and I'll press merge.
mvn spotless:apply now prints out statisticsblacelle
commented
Jan 31, 2023
README entry added. I also added a condition so that synthesis kicks-in only if |
nedtwigg
commented
Jan 31, 2023
I changed the Are these changes okay with you? If so I will merge. |
blacelle
commented
Jan 31, 2023
Thanks for the improvments. |
@nedtwigg I'm not convinced (anymore) about the WARN in case of not a single matching file. As the maven-plugin is executed per module, we may typically have a |
nedtwigg
commented
Jan 31, 2023
A fair amount of traffic on our bug tracker is
I'm happy to backtrack on this now or in the future, but it seems like it would be better to have a way for child pom to say e.g. |
blacelle
commented
Jan 31, 2023
@nedtwigg I'm also a user encountering many "it's not formatting any files". Which is one motivation for this PR. However, I foresee many WARNs in my own builds. I'd like to run a SNAPSHOT with one of my repository (to get a real feedback): do you know how I can deploy a SNAPSHOT in mvn local repository with the new setup ? (based on https://www.benediktritter.de/maven-plugin-development/) |
I think But that's a good point, I think we can use JITPACK again now too. I just turned JITPACK building back on, and it looks like it's working okay as of current master https://jitpack.io/com/github/diffplug/spotless/4c7b616e510bd83167ff329361ad819fac28ae6e/build.log Might be broken, not 100% sure... |
nedtwigg
commented
Jan 31, 2023
Ah, JITPACK is broken, working on that... |
nedtwigg
commented
Jan 31, 2023
fails with: Same for is OK. |
blacelle
commented
Jan 31, 2023
A run of This is many warnings in my perspective. Regarding people with wrong includes: what's often lacking to me (with spotless) is proper loggings (e.g. this PR adds a DEBUG log when cleaning a file). I'm not sure (...) people with issues would try |
nedtwigg
commented
Jan 31, 2023
I am not familiar with Maven culture. Defining a bunch of goals in the parent pom to apply to children but don't have any effect seems like bad practice. But I'm not a maven user, and I'm happy to merge whatever native maven users feel the default behavior ought to be. |
blacelle
commented
Feb 1, 2023
In my perspective, this is totally legit and standard practise. But I'm just a single user. Do you know any other mvn Spotless user which may give his opinion on this? |
nedtwigg
commented
Feb 1, 2023
I always lean towards PR author's preference, merged :) |
nedtwigg
commented
Feb 5, 2023
Published in |
Follows #1506