Skip to main content

Command Palette

Search for a command to run...

Sonar Fix : JavaNCSS

Published
1 min read
S

I love learning about technology and sharing that with others

Determines complexity of methods, classes and files by counting the Non Commenting Source Statements (NCSS). This check adheres to the specification for the JavaNCSS-Tool written by Chr. Clemens Lee. Rougly said the NCSS metric is calculated by counting the source lines which are not comments, (nearly) equivalent to counting the semicolons and opening curly braces.

  • Why we should adhere to this law

Rationale: Too large methods and classes are hard to read and costly to maintain. A large NCSS number often means that a method or class has too many responsabilities and/or functionalities which should be decomposed into smaller units.

10 views

More from this blog

H

hashcodehub

271 posts

Consistent, Passionate and Organized :)