Add Checkstyle to POM with Google settings advice #4047
Conversation
|
Beginnings of work on #3972. |
|
The code is currently indented with 4 spaces so I don't think it follows google's style. |
|
See changes to the config XML file. |
|
To be clear, the config has been adjusted to account for 4-space indentation. |
nickcmaynard
referenced
this pull request
Oct 23, 2016
Open
DISCUSSION :: Should we use maven-checkstyle to enforce Java coding style? #3972
Maybe also state that in the comment at the begin of the file, so people don't think this is the original one? |
|
Good idea - done. |
| @@ -1,6 +1,11 @@ | ||
| <?xml version="1.0"?> | ||
| <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> | ||
| +<!-- | ||
| + Adjusted from original Google Checkstyle config to match requirements for swagger-codegen | ||
| + See detailed comments next to changes |
ePaul
Oct 26, 2016
Contributor
Hmm, I don't understand this sentence. Maybe better "Following comment is from the original file retrieved from ..." (and include the URL of the source)?
(Also, please use some punctuation at the end of your sentences.)
nickcmaynard
Oct 26, 2016
Contributor
I shall add a link to the original file. However, I shan't be paying a great deal of attention to comments on grammar in a comment on a configuration file where it's patently obvious what's going on.
|
@wing328 Any thoughts on merging this? |
|
Looks good to me. |
wing328
added the
Enhancement: Feature
label
Nov 1, 2016
wing328
added this to the
v2.2.2
milestone
Nov 1, 2016
|
@nickcmaynard I did some tests and found the warnings (which are expected). Thanks for the contribution. |
wing328
merged commit 0c1b1aa into swagger-api:master Nov 1, 2016
nickcmaynard
deleted the
nickcmaynard:checkstyle branch
Nov 1, 2016
wing328
added the
Feature: Codegen
label
Feb 22, 2017
davidgri
pushed a commit
to davidgri/swagger-codegen
that referenced
this pull request
May 11, 2017
|
|
nickcmaynard + wing328 |
15b9556
|
nickcmaynard commentedOct 21, 2016
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0branch for breaking (non-backward compatible) changes.Description of the PR
Add Checkstyle to the Maven build, reporting noncompliance, but not enforcing style.