cnescatlab / sonar-cnes-report

Generates analysis reports from SonarQube web API.
GNU General Public License v3.0
425 stars 150 forks source link

javascript issues caught in sonarqube dashboard missing in cnes report #389

Closed fayazahamad closed 1 week ago

fayazahamad commented 4 months ago

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

image

image

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

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

Topin2001 commented 1 month ago

Hi, can you please provide me with your os, your sonarqube version and your sonar-cnes-report version too ? Also if you can have a look to the log of sonarqube and tell me if you see any warning when running the report generation thanks Thomas

Topin2001 commented 1 week ago

Without any reponse, I'm closing this issue, feel free to ask me to re-open it if you encounter this issue again