Skip to content

v2 release

Compare
Choose a tag to compare
@adireddy adireddy released this 04 Mar 11:04
· 768 commits to master since this release

checkstyle v2

New checks

  • SimplifyBooleanExpression
  • MultipleVariableDeclarations
  • AvoidInlineConditionals
  • EmptyBlock
  • OperatorWrap
  • SeparatorWrap
  • WhitespaceAfter
  • WhitespaceAround

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, RightCurly and NeedBraces checks to use token tree
  • 💥 BREAKING CHANGE 💥 removed BlockFormat check -> use LeftCurly, RightCurly and EmptyBlock instead

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

Limitations

Big thanks to @AlexHaxe for all his contributions and also to @Gama11 for his feedback and contributions.