Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Rajeev Kumar kallempudi
    @rajeevprasanna
    @nedtwigg any help
    Ned Twigg
    @nedtwigg
    You are using ratchetFrom
    But your CI is doing a bare checkout
    Search our GitHub isssues for bare checkout
    Chris Serra
    @chris-serra
    hi @nedtwigg -- we're looking to package up Spotless for Gradle as (to start) a Java formatter for internal Java projects. We'd like to limit the setup, so want to package it with an Eclipse XML, and other properties configured so that a Java project could just apply <our-wrapped-spotless> gradle plugin. I'm new to Gradle plugin development, so wondering if you had tips on this? As simple as possible -- just package up Eclipse XML, license header, and the spotless { ... } gradle task configurations so it's hands-off. Thanks!
    Ned Twigg
    @nedtwigg
    1 reply
    Chris Serra
    @chris-serra
    cool, thanks!
    Ned Twigg
    @nedtwigg
    Frank Vennemeyer
    @fvgh
    Looking at the ⭕ CI history, it seems to me that the tests have sporadic problems to resolve / store Maven dependencies. The dependencies themselves and the repost configuration look fine to me. Is it a known problem? For different jobs and different dependencies (guava, slf4j,...) a NoSuchFileException occurs in the Gradle cache.
    Ned Twigg
    @nedtwigg
    It has seemed flaky to me too (I very occasionally have to restart a test on a PR to fix a transient failure)
    I have no guesses re: cause
    David Smiley
    @dsmiley
    Hello. I'm investigating how best to forbid my Java source code from using C-style array declarations. I first went to the Google Java Formatter plugin and filed an issue -- google/google-java-format#615 but it's just a formatter so it was rejected. Error-Prone is another option but it seems more error oriented and less style oriented. Spotless seems like a sensible spot to add such a check maybe? Can someone suggest where/how the check might be added?
    Frank Vennemeyer
    @fvgh
    FYI: Just preparing update of Eclipse based formatters for Eclipse release 4.20. JDT and Groovy formatters will no longer support Java 8. Hence Java 11 will be required for all new Eclipse formatters.
    Ned Twigg
    @nedtwigg
    Sounds good! I think we should either A) adjust the default version based on the running JRE, or B) proactively throw an error about which versions require which JRE
    Probably should refactor the JRE detection to somewhere common, no opinion where
    Also fine to just let the errors and error reports come
    and we can add better error messages later
    Frank Vennemeyer
    @fvgh
    I like the approach used for Google formatter step. Will provide a proposal.
    Owais
    @owaiskazi19_twitter
    Hello! I've integrated spotless with Checkstyle in my project. There are few java files which Spotless ignores (might be because of the module directory) but checkstyle counts them, the tab space associate with the line and include it in the line length limit. As a result of this, I'm getting an error 'Line is longer than 140 characters'. Can someone help me with this?
    Gopal S Akshintala
    @overfullstack
    image.png

    I see inconsistent continuation_indent for the same function call as I apply spotless. Top one has 8 while the bottom one has 4. Is this expected?

    java

    My spotless config for java
    java {
        target("src/main/java/**/*.java", "src/test/java/**/*.java")
        targetExclude("$buildDir/generated/**/*.*")
        importOrder()
        removeUnusedImports()
        googleJavaFormat("1.11.0")
        trimTrailingWhitespace()
        indentWithSpaces(2)
        endWithNewline()
      }
    hyginous29
    @hyginous29
    Hi, spotless not removing the "unusedimports" in src/test/java files. My project is on Java11, gradle7 ..any solution for this issue ?