Conversation
|
is this using the druid template to check stuff ? |
|
@b-slim it doesn't check anything yet. Eventually we should add checks to enforce druid's rules. Two examples are commented in checkstyle.xml. |
|
Is this PR a WIP? If it's not a WIP, I politely request that we make it a WIP given that it doesn't actually enforce anything yet. |
|
@cheddar added some checks. Don't want to make this PR too big though. It's impossible to make checkstyle to enforce the whole Druid's code style in one PR. |
|
👍 Totally understand that it's not really possible to do everything. But also, introducing just boilerplate that doesn't do anything is equivalent to just adding cruft. Thanks for making this check something and fixing all the things. |
|
|
||
| <suppressions> | ||
| <!-- See http://checkstyle.sourceforge.net/config_filters.html#SuppressionFilter for examples --> | ||
| </suppressions> No newline at end of file |
There was a problem hiding this comment.
Should it be a new line in the end of the file?
| <module name="RedundantImport"/> | ||
| <module name="NeedBraces"/> | ||
| </module> | ||
| </module> No newline at end of file |
There was a problem hiding this comment.
Should it be a new line in the end of the file?
There was a problem hiding this comment.
@logarithm thanks. Made Checkstyle to check this, btw :)
|
👍 |
* Add Checkstyle framework * Avoid star import * Need braces for control flow statements * Redundant imports * Add NewLineAtEndOfFile check
* Add Checkstyle framework * Avoid star import * Need braces for control flow statements * Redundant imports * Add NewLineAtEndOfFile check
Fixes #3533.
This PR just adds the Checkstyle framework without enforcing any rules yet; they are supposed to be added one-by-one in different PRs.
Checkstyle's XML configs are placed in a directory named
codestylebecause there is an intention to movedruid_intellij_formatting.xml,eclipse_formatting.xmlandeclipse.importorderthere eventually.