You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Mariia Mykhailova (JIRA)" <ji...@apache.org> on 2015/06/09 00:18:00 UTC
[jira] [Created] (REEF-358) Fix violations / reconfigure checkstyle
checks in "Whitespace" category
Mariia Mykhailova created REEF-358:
--------------------------------------
Summary: Fix violations / reconfigure checkstyle checks in "Whitespace" category
Key: REEF-358
URL: https://issues.apache.org/jira/browse/REEF-358
Project: REEF
Issue Type: Sub-task
Components: All
Reporter: Mariia Mykhailova
Assignee: Mariia Mykhailova
Priority: Minor
Fix For: 0.12
We have several errors per each of the checks in "Whitespace" category, so I'm creating one task for all of them.
Here is the list of checks which are currently enabled in our checkstyle and have violations in the code, and my suggestions on how to fix them:
# *MethodParamPad* (prohibit whitespace between method/constructor name and left parenthesis of parameter list): our code has ~40 violations grouped in a few files, I suggest we fix violations and keep the check as is.
# *WhitespaceAfter* (enforce whitespace after comma and semicolon): our code has ~6 violations, I suggest we fix violations and keep the check as is.
# *EmptyForIteratorPad* (prohibit whitespace in empty for iterator): our code has 5 violations, personally I feel that the loops look better with whitespace so I suggest we change check configuration to enforce whitespace in empty for iterators.
# *NoWhitespaceAfter* (prohibit whitespace after certain types of tokens): our code has 1 violation,
org/apache/reef/examples/group/bgd/data/parser/SVMLightParser.java
new Object[] { examples.size(), avgFtLen, avgFtLen / examples.size() }
This code looks fine as is, so I suggest to change configuration to ignore ARRAY_INIT tokens (i.e., allow whitespace after {).
# *NoWhitespaceBefore* (prohibit whitespace before ; ): our code has 4 violations:
#* 2 empty for-loops {{for ( ; ; )}}
#* standalone ; at org/apache/reef/io/storage/local/LocalStorageService.java line 43
#* ; at org/apache/reef/wake/profiler/WakeProfiler.java line 214
I don't want to disable this check completely, but there's no way to disable it for empty for loops individually. For two last occurrences, I'd just fix the violations.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)