You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Elliotte Rusty Harold <el...@ibiblio.org> on 2024/11/29 12:27:43 UTC
autorun spotless
While working on a third party plugin I noticed it was configured to
autorun spotless as part of "mvn test" (and probably other goals):
[INFO] --- spotless:2.43.0:apply (default) @ spotbugs-maven-plugin ---
[INFO] Spotless.Format is keeping 10 files clean - 0 were changed to
be clean, 0 were already clean, 10 were skipped because caching
determined they were already clean
[INFO] Spotless.Format is keeping 182 files clean - 0 were changed to
be clean, 1 were already clean, 181 were skipped because caching
determined they were already clean
[INFO]
We should do that too in our poms to avoid the recurring and annoying
problems of forgetting to run spotless manually and consequently
having a meaningless break in the CI that needs to be investigated.
Integrated over all of us this should save a few days of developer
time per year.
I'd file a bug, but the way we've set up issue tracking this would be
one per repo, and I'm disinclined to file the same bug 40 times. Let's
just do it.
--
Elliotte Rusty Harold
elharo@ibiblio.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: autorun spotless
Posted by Slawomir Jaranowski <s....@gmail.com>.
hi
Who will commit changes if workspase on CI will be changed?
What will be merged if build pass on modified files?
pt., 29 lis 2024, 18:21 użytkownik Elliotte Rusty Harold <el...@ibiblio.org>
napisał:
> While working on a third party plugin I noticed it was configured to
> autorun spotless as part of "mvn test" (and probably other goals):
>
> [INFO] --- spotless:2.43.0:apply (default) @ spotbugs-maven-plugin ---
> [INFO] Spotless.Format is keeping 10 files clean - 0 were changed to
> be clean, 0 were already clean, 10 were skipped because caching
> determined they were already clean
> [INFO] Spotless.Format is keeping 182 files clean - 0 were changed to
> be clean, 1 were already clean, 181 were skipped because caching
> determined they were already clean
> [INFO]
>
> We should do that too in our poms to avoid the recurring and annoying
> problems of forgetting to run spotless manually and consequently
> having a meaningless break in the CI that needs to be investigated.
> Integrated over all of us this should save a few days of developer
> time per year.
>
> I'd file a bug, but the way we've set up issue tracking this would be
> one per repo, and I'm disinclined to file the same bug 40 times. Let's
> just do it.
>
> --
> Elliotte Rusty Harold
> elharo@ibiblio.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
Re: autorun spotless
Posted by Olivier Lamy <ol...@apache.org>.
It looks Romain was referring to failing early or late because of
spotless (bind the check goal to validate or verify phase)
Perso, I prefer to fail early (check at validate phase) because I find
it frustrating to run some 10 minutes build (because -Prun-its) and
then fail after so long because of a missing space :)
And have to re-run everything again.... (more time wasted)
But at the end of the day, it's very similar. It's just some personal
preferences that I find wasting more time when minor/useless problems
are detected later.
On Mon, 2 Dec 2024 at 08:35, Guillaume Nodet <gn...@apache.org> wrote:
>
> Currently, the build will fail both locally and on CI if your sources are
> not formatted properly.
> The proposal is to change local builds to auto-format and keep CI to a a
> check.
>
> So it cannot slow your dev workflow, quite the opposite, as instead of
> failing your build locally, the sources will be automatically formatted and
> the build will succeed. Am I missing something ?
>
> Guillaume
>
> Le dim. 1 déc. 2024 à 16:37, Romain Manni-Bucau <rm...@gmail.com> a
> écrit :
>
> > Not sure it is that important since at the end it will fail but from my
> > experience, bypassing it during the dev (ie being bound late) is nicer
> > cause you iterate faster.
> > That said we can PR to make it "failAtEnd", would be good anyway
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://x.com/rmannibucau> | Blog
> > <https://rmannibucau.metawerx.net/> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > <
> > https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064
> > >
> >
> >
> > Le dim. 1 déc. 2024 à 13:00, Maarten Mulders <mt...@apache.org> a
> > écrit :
> >
> > > +1 to make it part of the Maven build, either in validate or in verify
> > > phase. I usually do this in work projects, too. As Eliotte says, it
> > > avoids breaking the build in CI. Preferably enabled by default, also on
> > > local builds.
> > >
> > >
> > > The only thing where I doubt is whether validate or verify would be a
> > > good phase.
> > >
> > > Reasons for validate: early feedback on formatting, avoids compilation,
> > > testing etc. if the code is not formatted correctly.
> > > Reasons for verify: the important thing is that the code works,
> > > formatting is the last concern. "First make it work, then make it
> > pretty".
> > >
> > >
> > > WDYT?
> > >
> > >
> > > Maarten
> > >
> > > On 29/11/2024 13:27, Elliotte Rusty Harold wrote:
> > > > While working on a third party plugin I noticed it was configured to
> > > > autorun spotless as part of "mvn test" (and probably other goals):
> > > >
> > > > [INFO] --- spotless:2.43.0:apply (default) @ spotbugs-maven-plugin ---
> > > > [INFO] Spotless.Format is keeping 10 files clean - 0 were changed to
> > > > be clean, 0 were already clean, 10 were skipped because caching
> > > > determined they were already clean
> > > > [INFO] Spotless.Format is keeping 182 files clean - 0 were changed to
> > > > be clean, 1 were already clean, 181 were skipped because caching
> > > > determined they were already clean
> > > > [INFO]
> > > >
> > > > We should do that too in our poms to avoid the recurring and annoying
> > > > problems of forgetting to run spotless manually and consequently
> > > > having a meaningless break in the CI that needs to be investigated.
> > > > Integrated over all of us this should save a few days of developer
> > > > time per year.
> > > >
> > > > I'd file a bug, but the way we've set up issue tracking this would be
> > > > one per repo, and I'm disinclined to file the same bug 40 times. Let's
> > > > just do it.
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
> >
>
>
> --
> ------------------------
> Guillaume Nodet
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: autorun spotless
Posted by Guillaume Nodet <gn...@apache.org>.
Currently, the build will fail both locally and on CI if your sources are
not formatted properly.
The proposal is to change local builds to auto-format and keep CI to a a
check.
So it cannot slow your dev workflow, quite the opposite, as instead of
failing your build locally, the sources will be automatically formatted and
the build will succeed. Am I missing something ?
Guillaume
Le dim. 1 déc. 2024 à 16:37, Romain Manni-Bucau <rm...@gmail.com> a
écrit :
> Not sure it is that important since at the end it will fail but from my
> experience, bypassing it during the dev (ie being bound late) is nicer
> cause you iterate faster.
> That said we can PR to make it "failAtEnd", would be good anyway
>
> Romain Manni-Bucau
> @rmannibucau <https://x.com/rmannibucau> | Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <
> https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064
> >
>
>
> Le dim. 1 déc. 2024 à 13:00, Maarten Mulders <mt...@apache.org> a
> écrit :
>
> > +1 to make it part of the Maven build, either in validate or in verify
> > phase. I usually do this in work projects, too. As Eliotte says, it
> > avoids breaking the build in CI. Preferably enabled by default, also on
> > local builds.
> >
> >
> > The only thing where I doubt is whether validate or verify would be a
> > good phase.
> >
> > Reasons for validate: early feedback on formatting, avoids compilation,
> > testing etc. if the code is not formatted correctly.
> > Reasons for verify: the important thing is that the code works,
> > formatting is the last concern. "First make it work, then make it
> pretty".
> >
> >
> > WDYT?
> >
> >
> > Maarten
> >
> > On 29/11/2024 13:27, Elliotte Rusty Harold wrote:
> > > While working on a third party plugin I noticed it was configured to
> > > autorun spotless as part of "mvn test" (and probably other goals):
> > >
> > > [INFO] --- spotless:2.43.0:apply (default) @ spotbugs-maven-plugin ---
> > > [INFO] Spotless.Format is keeping 10 files clean - 0 were changed to
> > > be clean, 0 were already clean, 10 were skipped because caching
> > > determined they were already clean
> > > [INFO] Spotless.Format is keeping 182 files clean - 0 were changed to
> > > be clean, 1 were already clean, 181 were skipped because caching
> > > determined they were already clean
> > > [INFO]
> > >
> > > We should do that too in our poms to avoid the recurring and annoying
> > > problems of forgetting to run spotless manually and consequently
> > > having a meaningless break in the CI that needs to be investigated.
> > > Integrated over all of us this should save a few days of developer
> > > time per year.
> > >
> > > I'd file a bug, but the way we've set up issue tracking this would be
> > > one per repo, and I'm disinclined to file the same bug 40 times. Let's
> > > just do it.
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>
--
------------------------
Guillaume Nodet
Re: autorun spotless
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Not sure it is that important since at the end it will fail but from my
experience, bypassing it during the dev (ie being bound late) is nicer
cause you iterate faster.
That said we can PR to make it "failAtEnd", would be good anyway
Romain Manni-Bucau
@rmannibucau <https://x.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064>
Le dim. 1 déc. 2024 à 13:00, Maarten Mulders <mt...@apache.org> a
écrit :
> +1 to make it part of the Maven build, either in validate or in verify
> phase. I usually do this in work projects, too. As Eliotte says, it
> avoids breaking the build in CI. Preferably enabled by default, also on
> local builds.
>
>
> The only thing where I doubt is whether validate or verify would be a
> good phase.
>
> Reasons for validate: early feedback on formatting, avoids compilation,
> testing etc. if the code is not formatted correctly.
> Reasons for verify: the important thing is that the code works,
> formatting is the last concern. "First make it work, then make it pretty".
>
>
> WDYT?
>
>
> Maarten
>
> On 29/11/2024 13:27, Elliotte Rusty Harold wrote:
> > While working on a third party plugin I noticed it was configured to
> > autorun spotless as part of "mvn test" (and probably other goals):
> >
> > [INFO] --- spotless:2.43.0:apply (default) @ spotbugs-maven-plugin ---
> > [INFO] Spotless.Format is keeping 10 files clean - 0 were changed to
> > be clean, 0 were already clean, 10 were skipped because caching
> > determined they were already clean
> > [INFO] Spotless.Format is keeping 182 files clean - 0 were changed to
> > be clean, 1 were already clean, 181 were skipped because caching
> > determined they were already clean
> > [INFO]
> >
> > We should do that too in our poms to avoid the recurring and annoying
> > problems of forgetting to run spotless manually and consequently
> > having a meaningless break in the CI that needs to be investigated.
> > Integrated over all of us this should save a few days of developer
> > time per year.
> >
> > I'd file a bug, but the way we've set up issue tracking this would be
> > one per repo, and I'm disinclined to file the same bug 40 times. Let's
> > just do it.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
Re: autorun spotless
Posted by Maarten Mulders <mt...@apache.org>.
+1 to make it part of the Maven build, either in validate or in verify
phase. I usually do this in work projects, too. As Eliotte says, it
avoids breaking the build in CI. Preferably enabled by default, also on
local builds.
The only thing where I doubt is whether validate or verify would be a
good phase.
Reasons for validate: early feedback on formatting, avoids compilation,
testing etc. if the code is not formatted correctly.
Reasons for verify: the important thing is that the code works,
formatting is the last concern. "First make it work, then make it pretty".
WDYT?
Maarten
On 29/11/2024 13:27, Elliotte Rusty Harold wrote:
> While working on a third party plugin I noticed it was configured to
> autorun spotless as part of "mvn test" (and probably other goals):
>
> [INFO] --- spotless:2.43.0:apply (default) @ spotbugs-maven-plugin ---
> [INFO] Spotless.Format is keeping 10 files clean - 0 were changed to
> be clean, 0 were already clean, 10 were skipped because caching
> determined they were already clean
> [INFO] Spotless.Format is keeping 182 files clean - 0 were changed to
> be clean, 1 were already clean, 181 were skipped because caching
> determined they were already clean
> [INFO]
>
> We should do that too in our poms to avoid the recurring and annoying
> problems of forgetting to run spotless manually and consequently
> having a meaningless break in the CI that needs to be investigated.
> Integrated over all of us this should save a few days of developer
> time per year.
>
> I'd file a bug, but the way we've set up issue tracking this would be
> one per repo, and I'm disinclined to file the same bug 40 times. Let's
> just do it.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: autorun spotless
Posted by Slawomir Jaranowski <s....@gmail.com>.
Hi,
Hi it is never mind if we execute, check or apply during build ...
If a user see an error just on CI it looks like doesn't execute build
locally before push so it will not resolve a problem :-)
per-commit hook must be configured locally and IMHO should be a
simple quick task not a build or verifying project, but here everybody
can make their own decision what want ...
On Fri, 29 Nov 2024 at 23:18, Piotr P. Karwasz
<pi...@mailing.copernik.eu> wrote:
>
> Hi Elliotte,
>
> On 29.11.2024 13:27, Elliotte Rusty Harold wrote:
> > We should do that too in our poms to avoid the recurring and annoying
> > problems of forgetting to run spotless manually and consequently
> > having a meaningless break in the CI that needs to be investigated.
> > Integrated over all of us this should save a few days of developer
> > time per year.
>
> This can be done in a `pre-commit` Git Hook[1] installed locally. This
> way the CI is not affected and still detects formatting failures.
>
> Alternatively the CI could run `spotless:apply` and commit the result,
> but this requires additional permissions for the workflow. IIRC
> workflows triggered by `pull_request` can not write to the repository,
> only those triggered by `pull_request_target` can.
>
> Piotr
>
> [1] https://git-scm.com/book/ms/v2/Customizing-Git-Git-Hooks
>
> [2]
> https://github.com/apache/logging-parent/blob/main/.github/workflows/merge-dependabot-reusable.yaml
--
Sławomir Jaranowski
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: autorun spotless
Posted by "Piotr P. Karwasz" <pi...@mailing.copernik.eu>.
Hi Elliotte,
On 29.11.2024 13:27, Elliotte Rusty Harold wrote:
> We should do that too in our poms to avoid the recurring and annoying
> problems of forgetting to run spotless manually and consequently
> having a meaningless break in the CI that needs to be investigated.
> Integrated over all of us this should save a few days of developer
> time per year.
This can be done in a `pre-commit` Git Hook[1] installed locally. This
way the CI is not affected and still detects formatting failures.
Alternatively the CI could run `spotless:apply` and commit the result,
but this requires additional permissions for the workflow. IIRC
workflows triggered by `pull_request` can not write to the repository,
only those triggered by `pull_request_target` can.
Piotr
[1] https://git-scm.com/book/ms/v2/Customizing-Git-Git-Hooks
[2]
https://github.com/apache/logging-parent/blob/main/.github/workflows/merge-dependabot-reusable.yaml
Re: autorun spotless
Posted by Sylwester Lachiewicz <sl...@gmail.com>.
* don't
You are right that spotless will not touch files if you are unable to parse
it.
So let's try.
S.
pt., 29 lis 2024, 22:16 użytkownik Guillaume Nodet <gn...@apache.org>
napisał:
> Do or don’t ?
> Wdym “breaking it” ?
> If the code cannot be parsed, the formatted will simply fail (and fail the
> build btw), so it won’t modify it.
>
> ------------------------
> Guillaume Nodet
>
>
>
> Le ven. 29 nov. 2024 à 21:52, Sylwester Lachiewicz <sl...@gmail.com>
> a écrit :
>
> > I do think that's a good idea as it will always format code that may not
> > yet committed. Potentially breaking it
> >
> > Sylwester
> >
> > pt., 29 lis 2024, 21:10 użytkownik Guillaume Nodet <gn...@apache.org>
> > napisał:
> >
> > > Created the following PR which should work (still to be tested):
> > >
> > > https://github.com/apache/maven-parent/pull/215
> > >
> > > Le ven. 29 nov. 2024 à 18:21, Elliotte Rusty Harold <
> elharo@ibiblio.org>
> > a
> > > écrit :
> > >
> > > > While working on a third party plugin I noticed it was configured to
> > > > autorun spotless as part of "mvn test" (and probably other goals):
> > > >
> > > > [INFO] --- spotless:2.43.0:apply (default) @ spotbugs-maven-plugin
> ---
> > > > [INFO] Spotless.Format is keeping 10 files clean - 0 were changed to
> > > > be clean, 0 were already clean, 10 were skipped because caching
> > > > determined they were already clean
> > > > [INFO] Spotless.Format is keeping 182 files clean - 0 were changed to
> > > > be clean, 1 were already clean, 181 were skipped because caching
> > > > determined they were already clean
> > > > [INFO]
> > > >
> > > > We should do that too in our poms to avoid the recurring and annoying
> > > > problems of forgetting to run spotless manually and consequently
> > > > having a meaningless break in the CI that needs to be investigated.
> > > > Integrated over all of us this should save a few days of developer
> > > > time per year.
> > > >
> > > > I'd file a bug, but the way we've set up issue tracking this would be
> > > > one per repo, and I'm disinclined to file the same bug 40 times.
> Let's
> > > > just do it.
> > > >
> > > > --
> > > > Elliotte Rusty Harold
> > > > elharo@ibiblio.org
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > >
> > > >
> > >
> > > --
> > > ------------------------
> > > Guillaume Nodet
> > >
> >
>
Re: autorun spotless
Posted by Guillaume Nodet <gn...@apache.org>.
Do or don’t ?
Wdym “breaking it” ?
If the code cannot be parsed, the formatted will simply fail (and fail the
build btw), so it won’t modify it.
------------------------
Guillaume Nodet
Le ven. 29 nov. 2024 à 21:52, Sylwester Lachiewicz <sl...@gmail.com>
a écrit :
> I do think that's a good idea as it will always format code that may not
> yet committed. Potentially breaking it
>
> Sylwester
>
> pt., 29 lis 2024, 21:10 użytkownik Guillaume Nodet <gn...@apache.org>
> napisał:
>
> > Created the following PR which should work (still to be tested):
> >
> > https://github.com/apache/maven-parent/pull/215
> >
> > Le ven. 29 nov. 2024 à 18:21, Elliotte Rusty Harold <el...@ibiblio.org>
> a
> > écrit :
> >
> > > While working on a third party plugin I noticed it was configured to
> > > autorun spotless as part of "mvn test" (and probably other goals):
> > >
> > > [INFO] --- spotless:2.43.0:apply (default) @ spotbugs-maven-plugin ---
> > > [INFO] Spotless.Format is keeping 10 files clean - 0 were changed to
> > > be clean, 0 were already clean, 10 were skipped because caching
> > > determined they were already clean
> > > [INFO] Spotless.Format is keeping 182 files clean - 0 were changed to
> > > be clean, 1 were already clean, 181 were skipped because caching
> > > determined they were already clean
> > > [INFO]
> > >
> > > We should do that too in our poms to avoid the recurring and annoying
> > > problems of forgetting to run spotless manually and consequently
> > > having a meaningless break in the CI that needs to be investigated.
> > > Integrated over all of us this should save a few days of developer
> > > time per year.
> > >
> > > I'd file a bug, but the way we've set up issue tracking this would be
> > > one per repo, and I'm disinclined to file the same bug 40 times. Let's
> > > just do it.
> > >
> > > --
> > > Elliotte Rusty Harold
> > > elharo@ibiblio.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
> >
> > --
> > ------------------------
> > Guillaume Nodet
> >
>
Re: autorun spotless
Posted by Sylwester Lachiewicz <sl...@gmail.com>.
I do think that's a good idea as it will always format code that may not
yet committed. Potentially breaking it
Sylwester
pt., 29 lis 2024, 21:10 użytkownik Guillaume Nodet <gn...@apache.org>
napisał:
> Created the following PR which should work (still to be tested):
>
> https://github.com/apache/maven-parent/pull/215
>
> Le ven. 29 nov. 2024 à 18:21, Elliotte Rusty Harold <el...@ibiblio.org> a
> écrit :
>
> > While working on a third party plugin I noticed it was configured to
> > autorun spotless as part of "mvn test" (and probably other goals):
> >
> > [INFO] --- spotless:2.43.0:apply (default) @ spotbugs-maven-plugin ---
> > [INFO] Spotless.Format is keeping 10 files clean - 0 were changed to
> > be clean, 0 were already clean, 10 were skipped because caching
> > determined they were already clean
> > [INFO] Spotless.Format is keeping 182 files clean - 0 were changed to
> > be clean, 1 were already clean, 181 were skipped because caching
> > determined they were already clean
> > [INFO]
> >
> > We should do that too in our poms to avoid the recurring and annoying
> > problems of forgetting to run spotless manually and consequently
> > having a meaningless break in the CI that needs to be investigated.
> > Integrated over all of us this should save a few days of developer
> > time per year.
> >
> > I'd file a bug, but the way we've set up issue tracking this would be
> > one per repo, and I'm disinclined to file the same bug 40 times. Let's
> > just do it.
> >
> > --
> > Elliotte Rusty Harold
> > elharo@ibiblio.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>
> --
> ------------------------
> Guillaume Nodet
>
Re: autorun spotless
Posted by Guillaume Nodet <gn...@apache.org>.
Created the following PR which should work (still to be tested):
https://github.com/apache/maven-parent/pull/215
Le ven. 29 nov. 2024 à 18:21, Elliotte Rusty Harold <el...@ibiblio.org> a
écrit :
> While working on a third party plugin I noticed it was configured to
> autorun spotless as part of "mvn test" (and probably other goals):
>
> [INFO] --- spotless:2.43.0:apply (default) @ spotbugs-maven-plugin ---
> [INFO] Spotless.Format is keeping 10 files clean - 0 were changed to
> be clean, 0 were already clean, 10 were skipped because caching
> determined they were already clean
> [INFO] Spotless.Format is keeping 182 files clean - 0 were changed to
> be clean, 1 were already clean, 181 were skipped because caching
> determined they were already clean
> [INFO]
>
> We should do that too in our poms to avoid the recurring and annoying
> problems of forgetting to run spotless manually and consequently
> having a meaningless break in the CI that needs to be investigated.
> Integrated over all of us this should save a few days of developer
> time per year.
>
> I'd file a bug, but the way we've set up issue tracking this would be
> one per repo, and I'm disinclined to file the same bug 40 times. Let's
> just do it.
>
> --
> Elliotte Rusty Harold
> elharo@ibiblio.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
--
------------------------
Guillaume Nodet
Re: autorun spotless
Posted by Basil Crow <me...@basilcrow.com>.
On Fri, Nov 29, 2024 at 10:52 AM Guillaume Nodet <gn...@apache.org> wrote:
>
> We can use a profile which would be activated when not on CI. But +1 to
> enable it by default.
https://github.com/jenkinsci/plugin-pom/pull/1017 FTR
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: autorun spotless
Posted by Guillaume Nodet <gn...@apache.org>.
We can use a profile which would be activated when not on CI. But +1 to
enable it by default.
<activation> <property> <name>env.CI</name> <value>!true</value> </
property> </activation>
Le ven. 29 nov. 2024 à 19:16, Romain Manni-Bucau <rm...@gmail.com> a
écrit :
> Hi Eliotte,
>
> Not sure it is good for tests but for pom and main it shouldn't run apply
> (at least on the CI, can be locally) otherwise you would just hide the fact
> the style is not respected by formatting it locally on the CI in a PR for
> example and therefore merge the broken formatting (and defeating spotless
> setup).
>
> Romain Manni-Bucau
> @rmannibucau <https://x.com/rmannibucau> | Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <
> https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064
> >
>
>
> Le ven. 29 nov. 2024 à 18:21, Elliotte Rusty Harold <el...@ibiblio.org> a
> écrit :
>
> > While working on a third party plugin I noticed it was configured to
> > autorun spotless as part of "mvn test" (and probably other goals):
> >
> > [INFO] --- spotless:2.43.0:apply (default) @ spotbugs-maven-plugin ---
> > [INFO] Spotless.Format is keeping 10 files clean - 0 were changed to
> > be clean, 0 were already clean, 10 were skipped because caching
> > determined they were already clean
> > [INFO] Spotless.Format is keeping 182 files clean - 0 were changed to
> > be clean, 1 were already clean, 181 were skipped because caching
> > determined they were already clean
> > [INFO]
> >
> > We should do that too in our poms to avoid the recurring and annoying
> > problems of forgetting to run spotless manually and consequently
> > having a meaningless break in the CI that needs to be investigated.
> > Integrated over all of us this should save a few days of developer
> > time per year.
> >
> > I'd file a bug, but the way we've set up issue tracking this would be
> > one per repo, and I'm disinclined to file the same bug 40 times. Let's
> > just do it.
> >
> > --
> > Elliotte Rusty Harold
> > elharo@ibiblio.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>
--
------------------------
Guillaume Nodet
Re: autorun spotless
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Eliotte,
Not sure it is good for tests but for pom and main it shouldn't run apply
(at least on the CI, can be locally) otherwise you would just hide the fact
the style is not respected by formatting it locally on the CI in a PR for
example and therefore merge the broken formatting (and defeating spotless
setup).
Romain Manni-Bucau
@rmannibucau <https://x.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064>
Le ven. 29 nov. 2024 à 18:21, Elliotte Rusty Harold <el...@ibiblio.org> a
écrit :
> While working on a third party plugin I noticed it was configured to
> autorun spotless as part of "mvn test" (and probably other goals):
>
> [INFO] --- spotless:2.43.0:apply (default) @ spotbugs-maven-plugin ---
> [INFO] Spotless.Format is keeping 10 files clean - 0 were changed to
> be clean, 0 were already clean, 10 were skipped because caching
> determined they were already clean
> [INFO] Spotless.Format is keeping 182 files clean - 0 were changed to
> be clean, 1 were already clean, 181 were skipped because caching
> determined they were already clean
> [INFO]
>
> We should do that too in our poms to avoid the recurring and annoying
> problems of forgetting to run spotless manually and consequently
> having a meaningless break in the CI that needs to be investigated.
> Integrated over all of us this should save a few days of developer
> time per year.
>
> I'd file a bug, but the way we've set up issue tracking this would be
> one per repo, and I'm disinclined to file the same bug 40 times. Let's
> just do it.
>
> --
> Elliotte Rusty Harold
> elharo@ibiblio.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>