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

Ability to list all failing files with spotlessCheck #2418

Open
AchrafBelkahla opened this issue Feb 6, 2025 · 4 comments
Open

Ability to list all failing files with spotlessCheck #2418

AchrafBelkahla opened this issue Feb 6, 2025 · 4 comments

Comments

@AchrafBelkahla
Copy link

Hello

Today running spotlessCheck allows the display of maximum 10 files as stated in :

Example of logged error today :

Violations also present in 41 other files.

Run 'gradlew.bat :spotlessApply' to fix these violations.
\* Try:`
\> Run with \-\-stacktrace option to get the stack trace.
\> Run with --info or \-\-debug option to get more log output.

\* Get more help at https://help.gradle.org`

BUILD FAILED in 6s
3 actionable tasks: 1 executed, 1 from cache, 1 up-to-date

For our projects, we need be able to see all files that are breaking the formatting.
Could we remove this limit or raise it ?

Thank you

@jbduncan
Copy link
Member

jbduncan commented Feb 6, 2025

Would you like to see just the filenames or their contents, too?

@AchrafBelkahla
Copy link
Author

AchrafBelkahla commented Feb 6, 2025

@jbduncan The filenames should be enough 👍 like what is displayed today when we have less than 10 files

@jbduncan
Copy link
Member

jbduncan commented Feb 6, 2025

@AchrafBelkahla Great, thanks for clarifying.

I don't contribute to this repo as much as I used to, but I'm sure @nedtwigg wouldn't mind if you wanted to raise a PR.

Having said that, we'll need to agree on an API for this. I only know the Gradle plugin, but I imagine we'd want something like:

spotless {
    maxFilesToReport(9999)
}

We can always skip the Maven plugin until someone asks for this option there, too.

What do you think, both?

@AchrafBelkahla
Copy link
Author

This would be perfect of course if approved by @nedtwigg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants