-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Description
Leftover from #7988
Reference: #7988 (comment)
Add all tokens left to be added and make google_checks
adhere to Google style's chapter 4.6.2
https://google.github.io/styleguide/javaguide.html#s4.6.2-horizontal-whitespace
the colon (:) in an enhanced for ("foreach") statement
Between any content and a double slash (//) which begins a comment. Multiple spaces are allowed.
The following code should show violations wherever pointed.
class A {
public static void main(String args[]) {
for (int i:ll) { // violation as per 4.6.2.4
int k;
}
List<String>list; // violation as per 4.6.2.7
String g = "Google"; //google
// the line above: violation as per 4.6.2.6, should be "// google", space after "//"
}
}
C:\Users\Shashwat\Documents>java -jar checkstyle-8.31-all.jar -c config.xml Test.java
Starting audit...
Audit done.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done