You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
javascript issues caught in sonarqube dashboard missing in cnes report
i have a project with multiplr languages, java, html, css, java script where all of these related issues are showing up in sonarqube but CNES report missing java script issues, please find table copied from report and screen shots from sonar dashboard
To reproduce
<style>
</style>
Name
Description
Type
Severity
Number
CSS properties should be valid
The W3C specifications define the valid CSS properties. Only the official and browser-specific properties should be used to get the expected impact in the final rendering. This rule ignores: $sass, @less, and var(--custom-property) variable syntaxes. vendor-prefixed properties (e.g., -moz-align-self, -webkit-align-self). Noncompliant Code Example a { colour: blue; /* Noncompliant; colour is not part of the specifications */ } Compliant Solution a { color: blue; }
BUG
BLOCKER
19
Shorthand properties that override related longhand properties should be avoided
A shorthand property defined after a longhand property will completely override the value defined in the longhand property making the longhand one useless. The code should be refactored to consider the longhand property or to remove it completely. Noncompliant Code Example a { padding-left: 10px; padding: 20px; /* Noncompliant; padding is overriding padding-left making it useless / } Compliant Solution a { padding: 10px; / Compliant; padding is defining a general behaviour and padding-left, just after, is precising the left case */ padding-left: 20px; } See Mozilla Web Technology for Developers - Shorthand properties
BUG
CRITICAL
3
Selectors should be known
HTML, SVG, and MathML define the selectors which can be used in a CSS. A selector that is not part of them is likely to be a typo or a misunderstanding of the CSS syntax. Noncompliant Code Example field {} ul list {} Compliant Solution input {} ul li {}
BUG
CRITICAL
3
Results of "in" and "instanceof" should be negated rather than operands
Mixing up the order of operations will almost always yield unexpected results. Similarly, mis-applied negation will also yield bad results. For instance consider the difference between !key in dict and !(key in dict). The first looks for a boolean value (!key) in dict, and the other looks for a string and inverts the result. !obj instanceof SomeClass has the same problem. This rule raises an issue when the left operand of an in or instanceof operator is negated. Noncompliant Code Example if (!"prop" in myObj) { // Noncompliant; "in" operator is checking property "false" doTheThing(); // this block will be never executed } if (!foo instanceof MyClass) { // Noncompliant; "!foo" returns a boolean, which is not an instance of anything doTheOtherThing(); // this block is never executed } Compliant Solution if (!("prop" in myObj)) { doTheThing(); } if (!(foo instanceof MyClass)) { doTheOtherThing(); }
BUG
CRITICAL
3
The text was updated successfully, but these errors were encountered:
javascript issues caught in sonarqube dashboard missing in cnes report
To reproduce
<style> </style>
The text was updated successfully, but these errors were encountered: