On Sat, Jul 4, 2015 at 10:40 PM, Stefan Seelmann <[email protected]> wrote:
> Hi all, > > I created a basic checkstyle config [1] and fixed some (to me) obvious > issues. Some more checks make sense which require more changes in the > code but I'd like to ask all developers for their opinions. Once we > reach consensus I'd release the checkstyle file and add the check to the > build, in the beginning as deactivated profile or non-failing, once all > issues are fixed activated by default. > > > So here as quick poll, please express your opinion, my preferred option > is always (1) ;). > > +1, likewise, except no preference on line length am fine with either 120 or 80 thanks Stefan > > LocalVariableName: > Sometimes variable names like 'W1' (Asn1String) or 'Kc' (KcCheckSum) are > used. However variable names should start with lowercase character. I > guess this was done to follow names in specifications. > Poll: > (1) change variable names > (2) disable check > > > ParameterName: > Same as above (LocalVariableName) > Poll: > (1) change parameter names > (2) disable check > > > MethodName: > Some test methods contain underscores (e.g. > DecryptionTest.testDecryptDES_CBC_MD4_1) > Poll: > (1) change method names > (2) disable check > > > AvoidStarImport: > There are many usages of '*' imports, like 'import org.ietf.jgss.*;' > Poll: > (1) force explicit imports or each class > (2) allow star imports and disalbe check > > > AvoidInlineConditionals > There are 45 inline conditionals (e.g. 'return s != null ? > s.getVersion() : -1;') > Poll: > (1) allow inline condidtionals and disable check > (2) refactor inline conditionals > > > LineLength: > Poll: > (1) allow line length of 120 > (2) force line length of 80 > > > Whitespace: > There are about 1100 whitespace violations > Poll: > (1) follow Sun/Oracle Java convention (requires reformatting with > formatter, see below) > (2) something else > > > Curly braces: > There are 89 violations > Poll: > (1) follow Sun/Oracle Java convention (requires reformatting with > formatter, see below) > (2) something else > > > Formatter: > For Eclipse I'd also create a formatter with the following settings: > * Based on Java Conventions with following changes > * 4 spaces, no tabs > * Line length 120 instead of 80 > * No comment formatting (Javadoc, block, line) > Poll: > (1) that is fine > (2) something else > > > Kind Regards, > Stefan > > [1] > > https://svn.apache.org/repos/asf/directory/buildtools/checkstyle-configuration/trunk/src/main/resources/kerby-checks.xml > > -- Kiran Ayyagari http://keydap.com
