Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ncss Type Count violation

Tags:

java

sonarqube

I'm not really clear with this violation raised by PMD. Basically I have 2 questions:

  1. What should I do to get rid of this violation?

  2. What does the following statement mean?

The type has an NCSS line count of 944 Parameters
minimum: The type NCSS count reporting threshold: Default is 1500.

like image 304
Rudy Avatar asked Nov 15 '11 11:11

Rudy


People also ask

What is NCSS line count?

This rule uses the NCSS (Non Commenting Source Statements) algorithm to determine the number of lines of code for a given method. NCSS ignores comments, and counts actual statements. Using this algorithm, lines of code that are split are counted as one.

What is NCSS Java?

NCSS stands for Non-Commented Source Code lines. Methods and/or classes that have high NCSS counts are (at a very high level) too long, and can probably be split up. High numbers of NCSS are bad.


1 Answers

PMD Code size rules.

NCSS stands for Non-Commented Source Code lines. Methods and/or classes that have high NCSS counts are (at a very high level) too long, and can probably be split up. High numbers of NCSS are bad.

Additionally, it sounds like you might be using Sonar version 2.10 or prior, as Sonar Bug 2676 was fixed in 2.11.

like image 190
Mike Avatar answered Oct 08 '22 13:10

Mike