maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Lilja <mindcoo...@gmail.com>
Subject Re: Problems with checkstyle tests on Windows (Was [VOTE] Release Apache Maven Checkstyle Plugin version 3.1.0)
Date Thu, 18 Jul 2019 11:47:24 GMT
Hi Enrico!

If I remember correctly, a number of weeks ago I tried using Checkstyle
8.21 with maven-checkstyle-plugin (I had simply cloned the
maven-checkstyle-plugin repository) and it did solve the problem with the
test case discussed in this thread. However, as I recall there was another,
unrelated, test that started failing with Checkstyle 8.21, which I did not
investigate. I haven't tried Checkstyle 8.22, which has been released since.

Additionally, we could be a bit more ambitious in the
file-should-end-with-newline-test, if we also want to verify it's indeed
platform-agnostic now. In that case, we should generate the test files (to
avoid git interfering), one with linux-style EOLs and one with
Windows-style EOLs and test with both.

I might give it a go to uplift Checkstyle to 8.22 and possibly expand the
test as outlined above if you think it sounds like a reasonable proposition

- Eric L

On Wed, Jul 17, 2019 at 1:32 PM Enrico Olivelli <eolivelli@gmail.com> wrote:

> Il mer 17 lug 2019, 13:28 Eric Lilja <mindcooler@gmail.com> ha scritto:
>
> > I believe, if we instead upgrade to Checkstyle 8.21 or later, we don't
> need
> > to do any of those alternative approaches.
> >
> > https://github.com/checkstyle/checkstyle/issues/4073
>
>
> Eric
> I think it is the best idea
> Do you have cycles to give it a try?
>
> Enrico
>
>
>
> >
> > - Eric L
> >
> >
> > On Wed, Jul 17, 2019 at 1:20 PM Vladimir Sitnikov <
> > sitnikov.vladimir@gmail.com> wrote:
> >
> > > Robert>A clone from Git succeeds, but the sources.zip fails.
> > > Robert>The files in the zip are generated on a unix system, so all EOLs
> > in
> > > text files are LF
> > > Robert>...
> > > Robert>The fix: add a setup.groovy to the IT and rewrite the java files
> > > with OS specific EOLs
> > >
> > > Alternative approaches:
> > > A) Provide both Linux (LF) and Windows (CRLF) source distributions
> (e.g.
> > > *.zip and *.tgz).
> > > B) Specify "lineSeparator" explicitly. Then you could have both CRLF
> and
> > LF
> > > files at the same time and verify if those work
> > > C) Generate file at the build stage. If you generate it into target/
> > > directory, then you could generate the file with appropriate for the
> > > platform enconding
> > > D) Ensure the file is always in LF or CRLF by adding a relevant
> > > .gitattributes entry
> > >
> > > Vladimir
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message