Add review bot tool for checkstyle
Review Request #9488 — Created Jan. 16, 2018 and submitted
Checkstyle is a development tool to help developers write
Java code that adheres to a coding standard. It automates
the process of checking Java code.
This makes it ideal for projects that want to enforce a
coding standard.Checkstyle can check many aspects of the source code.
It can find class design problems, method design problems.
It also has the ability to check code layout and formatting
issues.http://checkstyle.sourceforge.net/
Added checkstyle as tool and saw that it finds correct "errors".
Description | From | Last Updated |
---|---|---|
Your description needs to be fleshed out a bit. Please see https://www.notion.so/reviewboard/Writing-Good-Change-Descriptions-10529e7c207743fa8ca90153d4b21fea for details. |
|
|
Some of the older files may have this at the top, but we don't duplicate this in each file anymore. … |
|
|
I think you meant to write "Review Bot tool" |
|
|
There may be many worker nodes, which may not all have the same config file present. Can we instead define … |
|
|
There's an extra > at the end of the line. This should also likely be "Checkstyle configuration file", though if … |
|
|
If there's some error when executing, will it give us valid XML to parse? Can this raise an exception that … |
|
|
Can we call this checkstyle_jar_path (or even just checkstyle_path) for consistency with the PMD config value? |
|
|
pass is unnecessary if there's another statement in the except handler. |
|
|
Should this be "checkers for java code"? |
|
|
Please wrap to 80 columns. |
|
|
Please wrap to 80 columns. |
|
Change Summary:
formatting
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+100) |
Checks run (2 succeeded)
-
-
checkstyle has a check for naming convention of java files. It checks if a class uses the same name for the filename. As the reviewbot create a temporary filename it will be an error for each run.
"The name of the outer type and the file do not match."
Is there an option to use a temporary directory with the real filename?
Change Summary:
docs
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+134) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+138) |
Checks run (2 succeeded)
-
-
Your description needs to be fleshed out a bit. Please see https://www.notion.so/reviewboard/Writing-Good-Change-Descriptions-10529e7c207743fa8ca90153d4b21fea for details.
-
bot/reviewbot/tools/checkstyle.py (Diff revision 4) Some of the older files may have this at the top, but we don't duplicate this in each file anymore. If your company needs to claim copyright that can go in the COPYING file.
-
-
bot/reviewbot/tools/checkstyle.py (Diff revision 4) There may be many worker nodes, which may not all have the same config file present. Can we instead define the configuration XML in the options and write that out to a file while executing?
-
bot/reviewbot/tools/checkstyle.py (Diff revision 4) There's an extra > at the end of the line. This should also likely be "Checkstyle configuration file", though if you make the change to have this be the config XML you will want to change the label/help text to match.
-
bot/reviewbot/tools/checkstyle.py (Diff revision 4) If there's some error when executing, will it give us valid XML to parse? Can this raise an exception that should be caught?
Summary: |
|
||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||||||||||||||
Commit: |
|
||||||||||||||||||||||||||||||||||||
Diff: |
Revision 5 (+123) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 6 (+131) |
Checks run (2 succeeded)
-
-
bot/reviewbot/config.py (Diff revision 6) Can we call this
checkstyle_jar_path
(or even justcheckstyle_path
) for consistency with the PMD config value? -
bot/reviewbot/tools/checkstyle.py (Diff revision 6) pass is unnecessary if there's another statement in the except handler.
-
docs/reviewbot/reviewbot/tools/checkstyle.rst (Diff revision 6) Should this be "checkers for java code"?
-
-
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 7 (+130) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 8 (+130) |