You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "jsoref (via GitHub)" <gi...@apache.org> on 2023/03/02 01:54:34 UTC

[PR] Resolve spotless complaints (logging-log4j2)

jsoref opened a new pull request, #1320:
URL: https://github.com/apache/logging-log4j2/pull/1320

   `spotless` is a real pain for drive-by-contributors (c.f. https://github.com/apache/logging-log4j2/issues/1216#issue-1538041705, there was an attempt in #1196, https://github.com/apache/logging-log4j2/issues/1319)
   
   My understanding is that the advice to everyone is that they'll need to run spotless on any files they change as part of any effort to make a pr and to tolerate any merge conflicts. That should mean that running spotless on the entire repo is fair game as it's equivalent to anyone making a PR and losing a race against any other PR.
   
   There's one notable problem with this PR, namely: https://github.com/apache/logging-log4j2/issues/1317, but someone can fix spotless for that and then fix the entire codebase. (That someone might be me if someone can explain what spotless is doing/why)
   
   ## Checklist
   
   - [x] use `main` otherwise
   - [ ] `./mvnw verify` succeeds (if it fails due to code formatting issues reported by Spotless, simply run `spotless:apply` and retry)
   - [ ] Changes contain an entry file in the `src/changelog/.2.x.x` directory
   - [x] Tests for the changes are provided -- spotless passes
   - [ ] [Commits are signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) (optional, but highly recommended) -- happy to do this if requested, but atm it's just overhead, and this took ~50 attempts.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Resolve spotless complaints (logging-log4j2)

Posted by "blacelle (via GitHub)" <gi...@apache.org>.
blacelle commented on PR #1320:
URL: https://github.com/apache/logging-log4j2/pull/1320#issuecomment-1455540950

   Hello. Would you consider https://github.com/marketplace/cleanthat/ to apply spotless automatically to incoming PRs ?
   
   (I'm the author of Cleanthat, and a Spotless contributor).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Resolve spotless complaints (logging-log4j2)

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on PR #1320:
URL: https://github.com/apache/logging-log4j2/pull/1320#issuecomment-1452347127

   @jsoref,
   
   When I introduced Spotless last September, I was looking for a fast way to remove most useless differences (whitespace and import ordering) between `2.x` and `main`, **without** one big commit. So I used the "ratchet" feature provided by Spotless. After 6 months of usage I must agree with you: we need to fix **all** files at once: "ratchet" does not work outside of a Git working tree and requires the CI to clone multiple commits instead of just the last one.
   
   If we are going to do that, we need to:
   
    * discuss **all** aspects of code style on the `dev@logging.apache.org` mailing list: the current Spotless configuration has a minimal set of rules and I would want to merge a big commit every time we add a code style rule. A complete [Java style guide](https://logging.apache.org/log4j/2.x/javastyle.html) is on our web site. This could be a starting point for a discussion, but I am sure that some rules are no longer supported.
      Line length, modifier order, `final` keyword, chained invocations wrapping: these are only some examples of rules that are not currently enforced by Spotless, but need to be agreed on.
    * propose a Spotless configuration in one PR,
    * apply the configuration to all files in a second PR (so that committers can verify it more easily).
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Resolve spotless complaints (logging-log4j2)

Posted by "blacelle (via GitHub)" <gi...@apache.org>.
blacelle commented on PR #1320:
URL: https://github.com/apache/logging-log4j2/pull/1320#issuecomment-1455548944

   > Line length, modifier order, final keyword, chained invocations wrapping: these are only some examples of rules that are not currently enforced by Spotless, but need to be agreed on.
   
   Line-length can be handlded in spotless with one of the formatting options (Eclipse, GoogleJavaFormat, etc)
   Modifier Order is supported through Cleanthat. Unnecessary final keywords also.
   I would need more details about expectations around `chained invocations wrapping`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Resolve spotless complaints (logging-log4j2)

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on PR #1320:
URL: https://github.com/apache/logging-log4j2/pull/1320#issuecomment-1632841071

   This has been solved in #1446.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Resolve spotless complaints (logging-log4j2)

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz closed pull request #1320: Resolve spotless complaints
URL: https://github.com/apache/logging-log4j2/pull/1320


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org