jlprat opened a new pull request #11254: URL: https://github.com/apache/kafka/pull/11254
Introduces Scalafix, a linter with some rewrite capabilities on top (https://scalacenter.github.io/scalafix/) By running the `checkScalafix` gradle tasks a report is printed with all broken rules. Running `scalafix` gradle task will apply some rewrites on the files, for example: import ordering, and annotating return types. This change uses the official gradle plugin for Scalafix, and Scalafix itself is maintained by the Scala Center. Current rules checked: - Do not allow `final var` - Explicit return types for public and protected methods (for public `val` and `var` the change was too big. This can be done at a later time) - Avoid procedure syntax in Scala - Avoid use of val in for comprehensions (it's a deprecated feature) *Known limitations*: when automatically inferring the return types, Scalafix might fail and pick a "too wide" type, i.e. `Any` instead of the correct one. After letting Scalafix fix the files, contributors should still look at the changes done and validate they are correct. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org