v2 release
checkstyle v2
New checks
SimplifyBooleanExpressionMultipleVariableDeclarationsAvoidInlineConditionalsEmptyBlockOperatorWrapSeparatorWrapWhitespaceAfterWhitespaceAround
Tree Tokenizer
- implemented tree tokenizer, adding a new class of checks based on tokens and their relationship
- tree tokenizer arranges all tokens into a tree structure
- all tree nodes have the same type with position info
- easy traversal of token tree
- access to parent token
- refactored
LeftCurly,RightCurlyandNeedBraceschecks to use token tree - 💥 BREAKING CHANGE 💥 removed
BlockFormatcheck -> useLeftCurly,RightCurlyandEmptyBlockinstead
Possible issues
- unhandled combinations of tokens can result in endless loops or stack traces in checks using token-tree
- temporary solution -> disable check in config
- open an issue with sample code
Big thanks to @AlexHaxe for all his contributions and also to @Gama11 for his feedback and contributions.