Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ned Twigg
    @nedtwigg
    it seems like you're probably looking at the full api reference, and using that as a quickstart
    Isaac Vargas
    @I-Vargas
    image.png
    I'm getting an exception because I'm not setting the target
    image.png
    when I was trying it out before it was working without setting the target, what am I missing now
    I'm using spotless 4.4
    Ned Twigg
    @nedtwigg
    Based on the snippet you posted, you are not applying the java plugin. You should have gotten the same error in earlier versions of Spotless too, if you weren't applying the java plugin then either. Is it possible there were more changes in your buildscript than just the spotless version? There could also be other plugins which used to apply the java plugin, but now don't (I'm speculating, but maybe something like kotlin-multiplatform might apply the java plugin, and then stop doing that in a future version, I don't know.
    It's easy to fix with target/src/**/*.kt
    correction: target 'src/**/*.kt'
    Isaac Vargas
    @I-Vargas
    yeah I know I can fix it with using target but I wanted to understand what was happening.
    Ah it's the general gradle plugin java that is missing.
    Yeah adding it to the plugins worked.
    I was thinking that it was something internal to spotless that I was missing that I needed to do.
    Thank you.
    Dan Hartman
    @dphart

    Hey there, I'm trying to upgrade from 3.X version to the latest and copying when I see in the https://plugins.gradle.org/plugin/com.diffplug.spotless

        classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.6.1'

    I just get an error
    Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin 'com.diffplug.gradle.spotless'.
    Caused by: org.gradle.api.GradleException: We have moved from 'com.diffplug.gradle.spotless'

    Ned Twigg
    @nedtwigg
    You need to find-replace com.diffplug.gradle.spotless with com.diffplug.spotless across your *.gradle files. See this changelog entry for more info.
    Jonathan Bluett-Duncan
    @jbduncan
    @nedtwigg You got there before me, right as I was about to post a response! ;)
    Ned Twigg
    @nedtwigg
    😂
    Oleh
    @Oleh-M
    Hi all
    Is there any way to format C++ string by using java API?
    without any plugin?
    or somehow call formatting step on file from java API?
    Ned Twigg
    @nedtwigg
    Yes
    Then these as an example:
    Oleh
    @Oleh-M
    Thank you very much
    Will try
    Rogier Hofboer
    @rogierhofboer
    Hi not sure if this has been asked before.. But for some reason on openHAB spotless wants Unix line endings on Windows, even with .gitattributes defined
    It can be reproduced on Windows by cloning https://github.com/openhab/openhab-core and running mvn -DskipTests=true clean install
    See also openhab/openhab-addons#8712 (the issue is about openhab-addons, but the same happens with openhab-core)
    Nowhere LINUX seems to be defined in the project, so I am totally lost as to why it happens.
    Any idea's or suggestions are very welcome. Thanks in advance!
    Radek Ježdík
    @redhead
    hi, I am having sudden issues formatting a project which uses spotless for a year already.. suddenly I get exception:
    12:46:03.345 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
    Execution failed for task ':server-backend-spi:spotlessJava'.
    > java.io.EOFException
    
    * Try:
    Run with --scan to get full insights.
    
    * Exception is:
    ....
    Caused by: com.diffplug.common.base.Errors$WrappedAsRuntimeException: java.io.EOFException
    at com.diffplug.common.base.Errors.asRuntime(Errors.java:408)
    at com.diffplug.gradle.spotless.SerializableMisc.fromStream(SerializableMisc.java:65)
    at com.diffplug.gradle.spotless.SerializableMisc.fromFile(SerializableMisc.java:44)
    .....
    Caused by: java.io.EOFException
    at com.diffplug.gradle.spotless.SerializableMisc.fromStream(SerializableMisc.java:60)
    ... 92 more
    but I can't figure out what's wrong, is there some debug option that would print the name of the file which is making troubles for spotless?
    on jenkins build, however, it works fine
    Radek Ježdík
    @redhead
    ok I needed to remove the whole folder and git checkout it again, now it works.. dunno where the issue was..
    Ned Twigg
    @nedtwigg
    Thanks @fvgh for the 4.18 lockfiles! Looks ready to ship to me, anything else you'd like before I cut a release?
    Frank Vennemeyer
    @fvgh
    Please go ahead with the release, @nedtwigg . Think that Groovy Eclipse will not finish their release for 4.18 this year. The commit message has a minor typo, but I didn't want to force push on main.
    Chris Serra
    @chris-serra
    is it possible to prevent the ratchetFrom feature from adding a year-range to the licenseHeaderFile step?
    Without adding the ratchetFrom step, it will not add the range -- if the year is already present, it leaves it alone.
    Ned Twigg
    @nedtwigg
    So you want it to just show the latest year?
    Or not touch the year at all?
    Chris Serra
    @chris-serra
    We have a license already in most files, although the company name has changed so we don't mind having that being replaced. But it is changing e.g. 2017 to 2017-2021
    Ned Twigg
    @nedtwigg
    You can use .updateYearWithLatest(false) to disable the year update
    Chris Serra
    @chris-serra
    Thank you. I was trying to access the Javadoc pages, but I kept getting Access Denied pages
    Ned Twigg
    @nedtwigg
    You can also just not have a $YEAR, and instead have 2017
    Yeah, javadoc works for 5.6.0 and previous, broken after, haven't figured out why
    Chris Serra
    @chris-serra
    beautiful, thank you!
    Ned Twigg
    @nedtwigg
    Also, if you are making changes, then I think your lawyers will want it to be (year created)-(year last modified). At least that's what Google's lawyers want
    Chris Serra
    @chris-serra
    haha we (us developers) were unsure of that as well, so maybe we DO want that. Although the changes made to most of those files were because I replaced the previous format toggle (JIndent's) with Spotless's
    Chris Serra
    @chris-serra

    @nedtwigg I may be having an issue related to: diffplug/spotless#746

    but it's not a git-submodule (I don't believe, not explicitly), but is a module of the project. This is only occurring on Jenkins, however.