Skip to content

Commit

Permalink
Finish Release-5.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ingmarkellner committed Jul 27, 2020
2 parents 1564f0b + 884307c commit 1de7f6f
Show file tree
Hide file tree
Showing 18 changed files with 2,505 additions and 261 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.hello2morrow</groupId>
<artifactId>sonar-sonargraph-integration</artifactId>
<version>5.1.2</version>
<version>5.1.3</version>
<packaging>sonar-plugin</packaging>

<name>SonarQube Sonargraph 9 Integration Plugin</name>
Expand Down
5 changes: 5 additions & 0 deletions release-notes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
SonarQube Sonargraph 8 Integration Plugin
=========================================

5.1.3
=====
- Support for Sonargraph quality gate issues.


5.1.2
=====
- Custom metric definitions are now again stored globally for all Sonargraph systems in a single file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ final class SonargraphBase
static final String PLUGIN_ISSUE_NAME = "PluginIssue";
static final String PLUGIN_ISSUE_PRESENTATION_NAME = "Plugin Issue";

static final String QUALITY_GATE_ISSUE_CATEGORY = "QualityGate";

private static final Logger LOGGER = LoggerFactory.getLogger(SonargraphBase.class);

static final Set<String> IGNORE_ISSUE_TYPE_CATEGORIES = Collections.unmodifiableSet(Arrays
Expand Down Expand Up @@ -102,7 +104,7 @@ static String trimDescription(final String description)
{
if (description != null && !description.isEmpty())
{
final String trimmedDescription = description.replaceAll("\r", " ").replaceAll("\n", " ").trim();
final String trimmedDescription = description.replace("\r", " ").replace("\n", " ").trim();
return trimmedDescription.length() > 255 ? trimmedDescription.substring(0, 252) + "..." : trimmedDescription;
}
return "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class SonargraphProfile implements BuiltInQualityProfilesDefinition
private static final Logger LOGGER = Loggers.get(SonargraphProfile.class);
static final List<String> RULE_KEYS = Arrays.asList("ARCHITECTURE_VIOLATION", "CRITICAL_MODULE_CYCLE_GROUP", "CRITICAL_NAMESPACE_CYCLE_GROUP",
"CRITICAL_COMPONENT_CYCLE_GROUP", "THRESHOLD_VIOLATION_ERROR", "TODO", "DELETE_REFACTORING", "MOVE_REFACTORING",
"MOVE_RENAME_REFACTORING", "RENAME_REFACTORING", "SCRIPT_ISSUE", "DUPLICATE_CODE_BLOCK");
"MOVE_RENAME_REFACTORING", "RENAME_REFACTORING", "SCRIPT_ISSUE", "DUPLICATE_CODE_BLOCK", "QUALITY_GATE_ISSUE");

private final String profileName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ private void processSystem(final SensorContext context, final ISoftwareSystem so
processSystemMetrics(context, context.project(), softwareSystem, systemInfoProcessor, rulesAndMetrics);

final List<IIssue> systemIssues = systemInfoProcessor.getIssues(issue -> !issue.isIgnored()
&& !SonargraphBase.ignoreIssueType(issue.getIssueType()) && issue.getAffectedNamedElements().contains(softwareSystem));
&& (issue.getIssueType().getCategory().getName().equals(SonargraphBase.QUALITY_GATE_ISSUE_CATEGORY)) || (!SonargraphBase.ignoreIssueType(issue.getIssueType()) && issue.getAffectedNamedElements().contains(softwareSystem)));
final Map<String, ActiveRule> keyToRule = rulesAndMetrics.getActiveRules();

for (final IIssue nextIssue : systemIssues)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
import java.util.Arrays;
import java.util.List;

/**
* Activates additional non-critical Sonargraph rules.
*/
public final class SonargraphStrictProfile extends SonargraphProfile
{
static final List<String> RULE_KEYS = Arrays.asList("MODULE_CYCLE_GROUP", "NAMESPACE_CYCLE_GROUP", "COMPONENT_CYCLE_GROUP",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
#Standard Sonargraph Metrics
#Fri Jul 10 18:24:42 CEST 2020
#Mon Jul 27 17:28:07 CEST 2020
CoreBiggestComponentCycleGroup=Biggest Component Cycle Group|INT|0.0|Infinity|Number of components in biggest cycle.
CoreDuplicates=Number of Code Duplicates|INT|0.0|Infinity|Number of duplicated code blocks.
CoreComponentDependenciesToRemoveComponents=Component Dependencies to Remove (Components)|INT|0.0|Infinity|Number of component dependencies to remove to break up all component cycles.
CoreArtifactCount=Number of Artifacts|INT|NaN|NaN|Number of architecture artifacts in checked files
CoreComponents=Number of Components|INT|NaN|NaN|Number of components.
CoreUnassignedComponents=Number of Unassigned Physical Components|INT|0.0|Infinity|Number of internal physical components that are not assigned to any artifact
CoreIgnoredDuplicates=Number of Ignored Code Duplicates|INT|0.0|Infinity|Number of ignored duplicated code blocks.
CoreUnassignedLogicalElements=Number of Unassigned Logical Elements|INT|0.0|Infinity|Number of internal logical elements that are not assigned to any artifact
CoreElementsInDeprecatedArtifacts=Number of Logical Elements in Deprecated Artifacts|INT|0.0|Infinity|Number of logical programming elements that are assigned to deprecated artifact
CoreRelativeCyclicityComponents=Relative Cyclicity (Components)|FLOAT|0.0|100.0|Relative component cyclicity in percent.
JavaPackages=Number of Java Packages|INT|NaN|NaN|Number of Java packages containing types.
JavaCriticalPackageCycleGroups=Number of Critical Java Package Cycle Groups|INT|0.0|Infinity|Number of Java package cycle groups marked as errors.
CoreCyclicComponents=Number of Cyclic Components|INT|0.0|Infinity|Number of cyclic components.
JavaRelativeCyclicityPackages=Relative Cyclicity (Java Packages)|FLOAT|0.0|100.0|Relative Java package cyclicity in percent.
JavaIgnoredCyclicPackages=Number of Ignored Cyclic Java Packages|INT|0.0|Infinity|Number of ignored cyclic Java packages.
CoreStructuralDebtIndexComponents=Structural Debt Index (Components)|INT|0.0|Infinity|Cumulative structural debt index of component cycles.
CoreMaintainabilityLevel=Maintainability Level|FLOAT|100.0|0.0|This metric estimates maintainability as a percentage. 100% is the best possible value. To do that it looks at the dependency structure between components (source files in most languages). Cyclic dependencies and low level classes with a lot of incomin...
CoreViolatingComponents=Number of Components with Violations|INT|0.0|Infinity|Number of components that contain architecture violations
JavaPackages=Number of Java Packages|INT|NaN|NaN|Number of Java packages containing types.
CoreModules=Number of Modules|INT|NaN|NaN|Number of modules.
CoreCyclicModules=Number of Cyclic Modules|INT|0.0|Infinity|Number of cyclic modules.
CoreRacd=RACD|FLOAT|0.0|100.0|Relative average component dependency. Average component dependency divided by the number of internal components multiplied by 100 (in percent).
CoreParserDependenciesToRemoveComponents=Parser Dependencies to Remove (Components)|INT|0.0|Infinity|Number of code lines to change to break up all component cycles.
CoreComponentCycleGroups=Number of Component Cycle Groups|INT|0.0|Infinity|Number of all component cycle groups, warnings and errors.
CoreStatements=Number of Statements|INT|NaN|NaN|Counts all statements.
JavaBiggestPackageCycleGroup=Biggest Java Package Cycle Group|INT|0.0|Infinity|Biggest Java package cycle group.
CoreSourceElementCount=Source Element Count|INT|NaN|NaN|Number of programming elements (i.e. types, fields, methods, functions, ...) plus number of statements.
CoreTypes=Number of Types|INT|NaN|NaN|Number of types (classes, enums or similar) in container.
JavaPackageCycleGroups=Number of all Java Package Cycle Groups|INT|0.0|Infinity|Number of all Java package cycle groups, errors and warnings
CoreViolationsComponentDependencies=Number of Violations (Component Dependencies)|INT|0.0|Infinity|Number of architecture-violating component dependencies
CoreUnassignedComponents=Number of Unassigned Physical Components|INT|0.0|Infinity|Number of internal physical components that are not assigned to any artifact
CoreLinesOfCode=Lines of Code|INT|NaN|NaN|Lines of code excluding blank and comment lines.
JavaStructuralDebtIndexPackages=Structural Debt Index (Java Packages)|INT|0.0|Infinity|Cumulative structural debt index of all Java package cycle groups.
CoreEmptyArtifactCount=Number of Empty Artifacts|INT|0.0|Infinity|Number of architecture artifacts that are empty in checked files
CoreCriticalComponentCycleGroups=Number of Critical Component Cycle Groups|INT|0.0|Infinity|Number of component cycle groups marked as errors.
CoreTypes=Number of Types|INT|NaN|NaN|Number of types (classes, enums or similar) in container.
JavaCriticalPackageCycleGroups=Number of Critical Java Package Cycle Groups|INT|0.0|Infinity|Number of Java package cycle groups marked as errors.
CoreNccd=NCCD|FLOAT|0.0|Infinity|Normalized cumulative component dependency according to John Lakos. The ratio between the cumulative component dependency and the cumulative component dependency of a balanced binary tree of the same size. A value greater than 1 indicates a more verti...
CoreCodeCommentLines=Code Comment Lines|INT|NaN|NaN|Counts all comment lines excluding header comments and blank comment lines.
CoreModules=Number of Modules|INT|NaN|NaN|Number of modules.
CoreIgnoredViolationsParserDependencies=Number of Ignored Violations (Parser Dependencies)|INT|0.0|Infinity|Number of parser dependencies in ignored architecture violations
CoreCommentLines=Comment Lines|INT|NaN|NaN|Counts all comment lines excluding blank comment lines.
CoreComponentsInDeprecatedArtifacts=Number of Components in Deprecated Artifacts|INT|0.0|Infinity|Number of components that are assigned to deprecated artifact
CoreMaintainabilityLevel=Maintainability Level|FLOAT|100.0|0.0|This metric estimates maintainability as a percentage. 100% is the best possible value. To do that it looks at the dependency structure between components (source files in most languages). Cyclic dependencies and low level classes with a lot of incomin...
CoreIgnoredViolationsParserDependencies=Number of Ignored Violations (Parser Dependencies)|INT|0.0|Infinity|Number of parser dependencies in ignored architecture violations
CoreViolationsParserDependencies=Number of Violations (Parser Dependencies)|INT|0.0|Infinity|Number of architecture-violating parser dependencies
JavaComponentDependenciesToRemovePackages=Component Dependencies to Remove (Java Packages)|INT|0.0|Infinity|Number of component dependencies to remove to break up all Java package cycle groups.
JavaAveragePackagePublicVisibility=Average Java Public Visibility (%)|FLOAT|0.0|100.0|Average of Java public visibility for all Java packages in a Java module
CoreTotalLines=Total Lines|INT|NaN|NaN|Counts all lines including empty and comment lines.
CoreArtifactCount=Number of Artifacts|INT|NaN|NaN|Number of architecture artifacts in checked files
CorePropagationCost=Propagation Cost|FLOAT|0.0|100.0|Propagation cost metric according to MacCormack, Rusnak and Baldwin.
CoreAcd=ACD|FLOAT|0.0|Infinity|Average component dependency according to John Lakos. Average number of components a component depends on directly and indirectly. This metric can be used to characterize the overall average coupling of internal components.
JavaStructuralDebtIndexPackages=Structural Debt Index (Java Packages)|INT|0.0|Infinity|Cumulative structural debt index of all Java package cycle groups.
JavaCyclicityPackages=Cyclicity (Java Packages)|INT|0.0|Infinity|Cumulated cyclicity of Java package cycle groups.
JavaRelativeCyclicityPackages=Relative Cyclicity (Java Packages)|FLOAT|0.0|100.0|Relative Java package cyclicity in percent.
CoreSourceElementCount=Source Element Count|INT|NaN|NaN|Number of programming elements (i.e. types, fields, methods, functions, ...) plus number of statements.
JavaPackageCycleGroups=Number of all Java Package Cycle Groups|INT|0.0|Infinity|Number of all Java package cycle groups, errors and warnings
CoreParserDependenciesToRemoveComponents=Parser Dependencies to Remove (Components)|INT|0.0|Infinity|Number of code lines to change to break up all component cycles.
CoreDuplicates=Number of Code Duplicates|INT|0.0|Infinity|Number of duplicated code blocks.
JavaAveragePackagePublicVisibility=Average Java Public Visibility (%)|FLOAT|0.0|100.0|Average of Java public visibility for all Java packages in a Java module
CoreUnassignedLogicalElements=Number of Unassigned Logical Elements|INT|0.0|Infinity|Number of internal logical elements that are not assigned to any artifact
CoreViolationsComponentDependencies=Number of Violations (Component Dependencies)|INT|0.0|Infinity|Number of architecture-violating component dependencies
CoreBiggestComponentCycleGroup=Biggest Component Cycle Group|INT|0.0|Infinity|Number of components in biggest cycle.
CoreCcd=CCD|INT|NaN|NaN|Cumulative component dependency according to John Lakos. Cumulated depends upon values.
CoreCyclicModules=Number of Cyclic Modules|INT|0.0|Infinity|Number of cyclic modules.
CoreIgnoredDuplicates=Number of Ignored Code Duplicates|INT|0.0|Infinity|Number of ignored duplicated code blocks.
JavaBiggestPackageCycleGroup=Biggest Java Package Cycle Group|INT|0.0|Infinity|Biggest Java package cycle group.
CoreViolationsParserDependencies=Number of Violations (Parser Dependencies)|INT|0.0|Infinity|Number of architecture-violating parser dependencies
CoreStatements=Number of Statements|INT|NaN|NaN|Counts all statements.
CoreViolatingComponents=Number of Components with Violations|INT|0.0|Infinity|Number of components that contain architecture violations
CoreStructuralDebtIndexComponents=Structural Debt Index (Components)|INT|0.0|Infinity|Cumulative structural debt index of component cycles.
CoreRacd=RACD|FLOAT|0.0|100.0|Relative average component dependency. Average component dependency divided by the number of internal components multiplied by 100 (in percent).
JavaCyclicPackages=Number of Cyclic Java Packages|INT|0.0|Infinity|Number of cyclic Java packages.
CoreComponentCycleGroups=Number of Component Cycle Groups|INT|0.0|Infinity|Number of all component cycle groups, warnings and errors.
JavaIgnoredCyclicPackages=Number of Ignored Cyclic Java Packages|INT|0.0|Infinity|Number of ignored cyclic Java packages.
CoreAcd=ACD|FLOAT|0.0|Infinity|Average component dependency according to John Lakos. Average number of components a component depends on directly and indirectly. This metric can be used to characterize the overall average coupling of internal components.
CoreComponentsInDeprecatedArtifacts=Number of Components in Deprecated Artifacts|INT|0.0|Infinity|Number of components that are assigned to deprecated artifact
CoreComponents=Number of Components|INT|NaN|NaN|Number of components.
CoreMaxAcd=Highest ACD|FLOAT|0.0|Infinity|Highest ACD.
JavaByteCodeInstructions=Byte Code Instructions|INT|NaN|NaN|Number of Java byte code instructions.
CoreCriticalComponentCycleGroups=Number of Critical Component Cycle Groups|INT|0.0|Infinity|Number of component cycle groups marked as errors.
CoreIgnoredCyclicComponents=Number of Ignored Cyclic Components|INT|0.0|Infinity|Number of ignored cyclic components.
CoreComponentsIgnoringIssues=Number of Components (Ignoring Issues)|INT|NaN|NaN|Number of components ignoring issues.
CoreElementsInDeprecatedArtifacts=Number of Logical Elements in Deprecated Artifacts|INT|0.0|Infinity|Number of logical programming elements that are assigned to deprecated artifact
CoreNccd=NCCD|FLOAT|0.0|Infinity|Normalized cumulative component dependency according to John Lakos. The ratio between the cumulative component dependency and the cumulative component dependency of a balanced binary tree of the same size. A value greater than 1 indicates a more verti...
CoreDuplicatedLines=Number of Duplicated Code Lines|INT|0.0|Infinity|Number of duplicated lines in duplicated code blocks.
JavaComponentDependenciesToRemovePackages=Component Dependencies to Remove (Java Packages)|INT|0.0|Infinity|Number of component dependencies to remove to break up all Java package cycle groups.
JavaParserDependenciesToRemovePackages=Parser Dependencies to Remove (Java Packages)|INT|0.0|Infinity|Number of code lines to change to break up all Java package cycle groups).
CorePropagationCost=Propagation Cost|FLOAT|0.0|100.0|Propagation cost metric according to MacCormack, Rusnak and Baldwin.
JavaByteCodeInstructions=Byte Code Instructions|INT|NaN|NaN|Number of Java byte code instructions.
CoreMaxAcd=Highest ACD|FLOAT|0.0|Infinity|Highest ACD.
CoreCyclicityComponents=Cyclicity (Components)|INT|0.0|Infinity|Cumulated cyclicity of component cycles.
JavaParserDependenciesToRemovePackages=Parser Dependencies to Remove (Java Packages)|INT|0.0|Infinity|Number of code lines to change to break up all Java package cycle groups).
CoreDuplicatedLines=Number of Duplicated Code Lines|INT|0.0|Infinity|Number of duplicated lines in duplicated code blocks. The duplicated lines of each code block are calculated as the sum of involved occurrences excluding the largest, which is treated as the reference.
Loading

0 comments on commit 1de7f6f

Please sign in to comment.