You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/08/02 08:40:22 UTC
[GitHub] [kafka] mdedetrich opened a new pull request, #12471: MINOR; Use underscore for variable initialization in BrokerServer
mdedetrich opened a new pull request, #12471:
URL: https://github.com/apache/kafka/pull/12471
In Scala its standard practice to use _ whenever you are initializing
variables. In regards to implementation, for object references
_ initialization maps to null so there is no chance in behaviour.
### 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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] mdedetrich commented on pull request #12471: MINOR; Use underscore for variable initialization in BrokerServer
Posted by GitBox <gi...@apache.org>.
mdedetrich commented on PR #12471:
URL: https://github.com/apache/kafka/pull/12471#issuecomment-1202384578
Yes there is, its called scalafix. Would just have to integrate it into gradle. There is also scalafix which works on the context free grammar linting fixes, I noticed there is a configuration for this already in Kafka but for some reason Gradle build doesn't use it (or at least it doesn't fail if there is a formatting error).
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] divijvaidya commented on pull request #12471: MINOR; Use underscore for variable initialization in BrokerServer
Posted by GitBox <gi...@apache.org>.
divijvaidya commented on PR #12471:
URL: https://github.com/apache/kafka/pull/12471#issuecomment-1202378703
Thank you for the review. Looks good. One question though (which does not have to be addressed part of this PR), do we have a linter for scala that can enforce such best practices?
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] mimaison merged pull request #12471: MINOR; Use underscore for variable initialization in BrokerServer
Posted by GitBox <gi...@apache.org>.
mimaison merged PR #12471:
URL: https://github.com/apache/kafka/pull/12471
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org