I'll look to make time to play with it and open a PR/Jira if I get anywhere useful. I only bothered with this thread since it is jarring if you are a new dev and clone the project and the build fails on first try.
-michael On Monday, November 12, 2018, Patrick Rhomberg <prhomb...@apache.org> wrote: > Spotless has only been checking our gradle for maybe a week or two. It > enforces dependency configurations using parentheses and single-quotes so > they would be easier to sort while some of us made dependencies explicit. > (Also, a future spotless improvement, once I can shake the bugs out). > > The issue you're hitting is exactly what the lineEndings='unix' is supposed > to alleviate. We specify lineEndings='unix', although looking at the > documentation now, DiffPlug "highly recommend[s] that you do not change > this value" from its default of GIT_ATTRIBUTES. (This has been the case > since shortly after its introduction in October of 2016.) > > You could try changing the lineEndings value to GIT_ATTRIBUTES and update > our .gitattributes to define a less-narrowly-defined eol. (It currently > appears to only target *.java files.) I don't have a Windows environment > up and running to test this on, but if you wanted to poke at these corners, > it's likely where the issue lives. Otherwise, we could coerce a platform > check into spotlessCheck.upToDateWhen so that it is skipped on Windows, but > I'd be morally opposed to that. > > Imagination is Change. > ~Patrick > > [1] https://github.com/diffplug/spotless/tree/master/plugin-gradle > [2] https://help.github.com/articles/dealing-with-line-endings/ > > On Sun, Nov 11, 2018 at 8:47 PM, Owen Nichols <onich...@pivotal.io> wrote: > > > The pipeline does actually build on Windows, but with -x spotlessCheck > > > > Someone (maybe whoever’s touched th spotless rules most recently) might > > know what to do. I tend to agree that the same source code ought to be > able > > to pass spotless on both Linux and windows; and our pipeline should > > probably be tweaked to ensure this gets tested. > > > > On Sun, Nov 11, 2018 at 8:35 PM Michael Oleske <mole...@pivotal.io> > wrote: > > > > > Hi Geode Dev Friends! > > > > > > I was building the latest off of develop (hash 75d7ed8a49d6) in > > PowerShell > > > on my Windows box and noticed during build that the spotless check > > failed. > > > It strangely fails on line endings (\r\n fun times) on what seems to be > > all > > > (or at least 34 of them) build.gradle files. This seems odd to me > since > > I > > > didn't realize that spotless check actually checked more than just java > > > files. I assume no pipeline picked this up since the pipelines would > > build > > > once and pass the jar around rather than build on Windows and Linux > > (since > > > JVM and all that). I haven't tracked down when this started happening > to > > > me (though I can if that is of interest to people). > > > > > > If anyone has any thoughts I'd like to hear (even if they are just why > > > Windows why!) > > > > > > -michael > > > > > >