GithubHelp home page GithubHelp logo

racodond / sonar-css-plugin Goto Github PK

View Code? Open in Web Editor NEW
49.0 49.0 27.0 5.81 MB

SonarQube CSS / SCSS / Less Analyzer

License: GNU Lesser General Public License v3.0

Java 64.32% HTML 2.10% CSS 33.57% Shell 0.02%
code-quality css guidelines less linter scss sonarqube sonarqube-plugin static-analysis static-analyzer styleguide stylelint

sonar-css-plugin's People

Contributors

agabrys avatar christophelevis avatar dbolkensteyn avatar dgageot avatar ehartmann avatar ganncamp avatar ganntest avatar godin avatar julienlancelot avatar kalidasya avatar lindamartin avatar lopho avatar racodond avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonar-css-plugin's Issues

Add support of /deep/ selector combinator

I'm getting parse errors on .scss files that contain a /deep/ selector.

Code:
/deep/ .modal-content { ^ 17: width: $sp-modal-small-width; 18: }

Error:

Parse error at line 16 column 1: 6: top:20px; 7: right:20px; 8: color: $gray-light; 9: opacity: 1; 10: } 11: 12: .close:focus, .close:hover { 13: opacity: 0.75; 14: } 15: 16: /deep/ .modal-content { ^ 17: width: $sp-modal-small-width; 18: } 19: 20: .modal-header { 21: padding: 0px $sp-modal-side-padding; 22: height: $sp-modal-header-height; 23: } 24: 25: .modal-body { 26: padding: $sp-modal-content-vertical-padding $sp-modal-side-padding

I think this is a bug in the sonar-scanner but I can't find any references to it anywhere online.

So i guess this is a bug report.

Cheers,

Bob

Rule unknown-type-selector should not raise an issue when selector starts with & (referencing parent)

Hi,

I'm getting a lot of errors of this type because I'm concatenating class names using the & operator and I would like to know where is the error coming from, if it's a bug or is it normal.

For example this code gives me the error "Remove this usage of the unknown "&-item" type selector."

.nav-top__icons { display: inline-block; margin-left: 10px; &-item { cursor: pointer; display: inline-block; padding: 10px 9px; } }

Thank you,
Romain

Less parse error

.so-loading {
    // loader white veil
    &:before {
        content: @space;
        position: fixed;
        z-index: 100;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.5);
    }
    // loader spinning wheel
    &:after {
        @loader-size: 30px;
        @container-size: @loader-size + 10px;
 
        content: @space;
        position: fixed;
        z-index: 101;
        left: 50%;
        top: 50%;
        width: @container-size;
        height: @container-size;
        margin: -@container-size/2 0 0 -@container-size/2;
        background: white url("../img/ratings/loader.gif") 50% 50% no-repeat;
        background-size: @loader-size;
        box-shadow: 0 3px 9px rgba(0, 0, 0, 0.3);
        .rounded(@container-size/2);
Parse error at line 30 column 33: 20: position: fixed; 21: z-index: 101; 22: left: 50%; 23: top: 50%; 24: width: @container-size; 25: height: @container-size; 26: margin: -@container-size/2 0 0 -@container-size/2; 27: background: white url("../img/ratings/loader.gif") 50% 50% no-repeat; 28: background-size: @loader-size; 29: box-shadow: 0 3px 9px rgba(0, 0, 0, 0.3); 30: .rounded(@container-size/2); ^ 31: } 32: } 33: 34: .icon-disc(@bg-color, @color, @size) { 35: content: @space; 36: display: inline-block; 37: width: @size; 38: height: @size; 39: line-height: @size; 40: font-size: @size;   
il y a 4 jours   L30     
Bug     Major     Open    [email protected] Racodon,David,LAUSANNE,Contractor for GLOBE-DSU-Sol Delivery-Dev QA   30min effort   Comment
 No tags  
    }
}

Parsing Less Functions containing default values gets interpreted as Pseudo-Elements

Hey,

parsing less functions containing default values for params (e.g.@animation-count:infinite) results in a Major SonarQube issue

Remove this usage of the unknown "linear" pseudo.

LESS-Sample

.animation (@animation-name, @animation-duration, @animation-count:infinte, @timing-function:linear){
   -webkit-animation: @animation-name @animation-duration @animation-count @timing-function;
    animation: @animation-name @animation-duration @animation-count @timing-function;
}

Update validators for properties 'justify-content' and 'align-content'

According to https://drafts.csswg.org/css-align-3/#typedef-content-position justify-content can be left or right

< content-position >
This set is used by justify-content and align-content to align the box’s contents within itself.

< content-position > = center | start | end | flex-start | flex-end | left | right;

But currently I get "Update the invalid value of property "justify-content". Expected format: flex-start | flex-end | center | space-between | space-around" for justify-content: left;

Remove 'fill' from the experimental property list.

I would recommend removing 'fill' from the list of 'experimental properties'.
As the rule "Experimental properties should not be used" states:

A property is considered as experimental if it is not supported by IE/Edge 11+, Firefox 44+ and Chrome 48+.

As far as I can see, 'fill' is supported by all of these browsers, down to IE 9+ (source).

Parsing nested lesscss declarations can reach to false positive critical issues in sonarqube

Hello,

I'm facing a lot of "false positive" alerts on a big less codebase with SonarQube CSS plugin.

Most of thos "false positive" seems linked to nested declarations in lesscss

for example, when parsing a nested rule like

.mySubClass {
    background-color: blue;

    html:not(.myClass) & {
        ...
    }
}

it leads to 2 differents alerts that should not be thrown

  • Unknown properties should be removed -> Remove this usage of the unknown "html" property.
  • Unknown CSS / Less functions should be removed -> Remove this usage of the unknown "not" function.

it seems that html:not(...) is parsed as if it was a css property and not a nested rule.

Unknown Type Selector doesn't account for ampersands in nested SCSS selector definitions

We have multiple selector definitions nested within our SCSS files that utilize the & to refer to the parent class like so:

.parent {
    &__child
}

where &__child would compile to .parent__child. The problem is that when we run the scanner, it tells us that __child is an unknown type selector. Is there any way to fix this short of turning off this rule?

Less Parser error: mixin parameter does not accept expression

Hello we encountered this failure in less parser however lessc compile this normally

.sprites(@sprites, @i: 1) when (@i <= length(@sprites)) {
@sprite: extract(@sprites, @i);
@sprite-name: e(extract(@sprite, 10));
.@{sprite-name} {
.sprite(@sprite);
}
.sprites(@sprites, @i + 1);
}

Parse error at line 569 column 25:
567: .sprite(@Sprite);
568: }
569: .sprites(@sprites, @i + 1); ^
570: }

We don't see anything wrong with it. We are using version 4.5. Can you advice?

Update CSS grammar to allow /deep/ combinator as first element of a selector

Hello,

I saw that a few versions ago it was added support to /deep/ combinator, but for me is not working. I'm using version 4.7
Code:
/deep/ .btngroupstyle { background-color: black; border-color: #8cd1fa; border-style: solid; border-width: 1.5px; height: 35px; }
Error:
Parse error at line 44 column 1: 34: border-color: #8cd1fa; 35: border-radius: 5px; 36: border-style: solid; 37: border-width: 1.5px; 38: height: 35px; 39: margin-bottom: 10px; 40: text-align: left; 41: width: 70px; 42: } 43: 44: /deep/ .btngroupstyle { ^ 45: background-color: #ffffff; 46: border-color: #8cd1fa; 47: border-style: solid; 48: border-width: 1.5px; 49: height: 35px; 50: } 51: 52: .buttonload { 53: background-color: #0098f3; 54: color: #ffffff;

Regards.

Properly compute standard property for nested SCSS properties so that rules such as experimental-property-usage works fine

Hi,

I get the violation 'Remove this usage of the experimental "size" property.' on a file but it seems to be wrong in this case.

Here is the rule in my .scss file:

@mixin font-normal {
  color: $color-font;
  font: {
    family: Arial, Helvetica, sans-serif;
    size: $fontSize-m;
    weight: 300;
  }
  line-height: $lineHeight-m;
}

The violation is right in the row containing the size.

It seems that the outer font is not detected here but it is valid CSS.
It is quite interesting that the other rules family and weight got no violation :-)

Is it possible to adjust the rule?

Thanks in advance!

Feature Request: SonarLint support

Hello,

SonarLint is an extension for IDE that provides on-the-fly feedback directly in IDE.
But sonar css plugin doesn't support SonarLint extension.

Does anyone know the reason why css plugin doesn't support SonarLint extension ?
Is it possible to add this support ?

I haven't found any discussion about this so I'm just wondering if any work has been done for this.

Thanks,
Roman

Embedded CSS Analyzer breaking if the HTML files have UTF8 encoding with BOM

Hi,

The embedded CSS analyser is breaking if any of the source files with having UTF8 with BOM encoding.

This issue can be reproduced by creating any HTML file with UTF8-BOM encoding and running the analyser on it.

The stack trace is something like below:

2017-07-26T12:02:02.2237054Z ##[error]java.lang.IllegalArgumentException: 26 is not a valid line offset for pointer. File [<>.html] has 24 character(s) at line 1
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.api.internal.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:215)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:206)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.api.batch.fs.internal.DefaultInputFile.newRange(DefaultInputFile.java:237)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.plugins.css.IssueSaver.newLocation(IssueSaver.java:128)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.plugins.css.IssueSaver.savePreciseIssue(IssueSaver.java:61)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.plugins.css.IssueSaver.saveIssue(IssueSaver.java:51)
2017-07-26T12:02:02.2237054Z ##[error]at java.util.ArrayList.forEach(ArrayList.java:1249)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.plugins.css.AbstractLanguageAnalyzerSensor.saveSingleFileIssues(AbstractLanguageAnalyzerSensor.java:170)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.plugins.css.AbstractLanguageAnalyzerSensor.execute(AbstractLanguageAnalyzerSensor.java:114)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:182)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:247)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:242)
2017-07-26T12:02:02.2237054Z ##[error]at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:240)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:232)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:118)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
2017-07-26T12:02:02.2247050Z ##[error]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2017-07-26T12:02:02.2247050Z ##[error]at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2017-07-26T12:02:02.2247050Z ##[error]at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2017-07-26T12:02:02.2247050Z ##[error]at java.lang.reflect.Method.invoke(Method.java:498)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
2017-07-26T12:02:02.2247050Z ##[error]at com.sun.proxy.$Proxy0.execute(Unknown Source)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
2017-07-26T12:02:02.2247050Z ##[error]at org.sonarsource.scanner.cli.Main.main(Main.java:61)
2017-07-26T12:02:02.2247050Z ##[error]ERROR:

Thanks
Vamsee

Add missing SCSS modulo operator (%)

$component-space: 21px;

@function components-add-margins($bot, $top) {
  // Parameter validation
  @if unit($bot) != "px" or unit($top) != "px" {
    @error "Parameter $bot and $top are expected to be of type 'px'.";
  }

  $sum : ($top + $bot) % $component-space;
  @if $sum <= 0 {
    $sum : $sum + $component-space;
  }
  @return $sum;
}

This error is displayed for the "%" symbol:

Parse error at line 27 column 25: 17: /// 18: /// @param {Number} $bot - Margin in pixels 19: /// @param {Number} $top - Margin in pixels 20: /// @returns {Number} In pixels 21: @function components-add-margins($bot, $top) { 22: // Parameter validation 23: @if unit($bot) != "px" or unit($top) != "px" { 24: @error "Parameter $bot and $top are expected to be of type 'px'."; 25: } 26: 27: $sum : ($top + $bot) % $component-space; ^ 28: @if $sum <= 0 { 29: $sum : $sum + $component-space; 30: } 31: @return $sum; 32: } 33: 34: /// Substracts a margin from the standard margin and takes care that it not results less or equal 0px 35: /// 36: /// This function can handle $sub to be too large or to be negative. 37: /// @example

Sass has no problem with this syntax.

Thank you

Less Parser error: 'not' only supported for first mixin guard condition

Hello we encountered this failure in less parser however lessc compile this normally

// Set the background opacity with no opaque on content
.background-opacity(@c, @alpha) when (iscolor(@c)) and not (@c=~"transparent") {
background: hsla(hue(@c), saturation(@c), lightness(@c), @alpha);
}

Parse error at line 11 column 63:
10: // Set the background opacity with no opaque on content
11: .background-opacity(@c, @Alpha) when (iscolor(@c)) and not (@c=~"transparent") { ^
12: background: hsla(hue(@c), saturation(@c), lightness(@c), @Alpha);
13: }

We don't see anything wrong with it. We are using version 4.5. Can you advice?

FP on rule class-selector-naming-convention within mixin calls

Hi, I have found the following situation:

Whenever I use a less mixin (http://lesscss.org/features/#mixins-feature) I get an error telling me "Class selectors should follow a naming convention". This shouldn't be an error when using Less as it is following the official syntax.

We could enforce to always use parenthesis when using a mixin even if it has no argument (Less allows us to avoid parenthesis if the mixin has no arguments).

Thanks!

Version 4.0 or higher not available in update center

Hi,

The latest version of the plugin we see in the update center is version 3.1 . Versions 4.0 to 4.4 are not available. Will they become available or should we install them manually? And what about the compatibility with different SonarQube versions?

Parsing errors

Hi,

for every less file encoding with UTF-8 with BOM I get an parsing error. (less:S2260) What can I do?

Kind Regards
Andy

FP on rule display-property-grouping with float:none

Hi,

We have encountered reporting of major issues which are false positives in some cases because of the following rule:

Remove this "float" declaration that does not work with the "display" declaration.

This should be the case in scenarios like:
display: inline-block; float: left;

But the issue is reported also when float is disabled because it is not supposed to be used with floats:
display: inline-block; float: none;

[curiousity Question] future of sonar-css-plugin

Hi!

I already asked the same question in the sonarqube mailing list, as there was the swap from this project to the one of kalidasya as the main project repo (at least in the sonarqube updatecenter).

Right now it seems like, that this project is improving, and developed further, which is quite nice.

My question is, if the changes made in here, will be back ported to the "main" repo, or at least if it is planned to be done, or not? If not, i am also quite curious about the reasoning.

Anyway i want to thank you again for a great plugin.

Br
Simon

Accept 8 digit color and 4 digit color

According to https://drafts.csswg.org/css-color/#typedef-hex-color, color can be 8 digits length:

The first 6 digits are interpreted identically to the 6-digit notation. The last pair of digits, interpreted as a hexadecimal number, specifies the alpha channel of the color, where 00 represents a fully transparent color and ff represent a fully opaque color.

But currently I get "Update the invalid value of property "color". Expected format: < color >" for color: #acacacac;

Rule validate-property-value: Update ‘animation’ validator to support multiple animations

Hi,

2 issues:
a. Seems animation checking rule does not accept second "single-animation"
b. Rule output does not align with animation definitions

plugin rule output:
Update the invalid value of property "animation". Expected format: || || || || || || ||

Refer to following link http://www.w3.org/TR/css3-animations/#animations
animation [ ‘,’ ]*
= || || || || || || ||

Example: it will fire css:validate-property-value. however there is no rule fired if second single animation is removed.
.alert.show {
visibility: visible;
animation: fadein .5s, fadeout 1s;
}
@Keyframes fadein {
from { opacity: 0;}
to { opacity: 1;}
}
@Keyframes fadeout {
from { opacity: 1;}
to { opacity: 0;}
}

Erroneous STATEMENT_BLOCK recognition order for Less

Hi,

I have a less file with next code:

.documents-table {
    th:nth-child(1), td:nth-child(1) {
...

And sonar-css-plugin create 4 violations on it:

  1. Add one whitespace between the colon and the value. - but it's not a value for :, it's a pseudo class
  2. Add a semicolon at the end of this declaration. - But it's not the end of the declaration
  3. Remove this usage of the unknown "th" property. - But his is not a property, this is child less selector tag
  4. Remove this usage of the unknown "nth-child" function. - But this is well-known pseudo class, not a function

I am using 3.1 version of plugin.

Update background-position validator (multiple backgrounds)

Hi!

I have some rules in a class, kind of like this:

background-image: url("/pic1.png"), url("/pic2.png");
background-position: center center, top left;

It got flagged as as an error:
Update the invalid value of property "background-position". Expected format: [ | | top | bottom | center | left | right ]+

I was following this page on MDN to implement the multiple background images:
https://developer.mozilla.org/en/docs/Web/CSS/CSS_Background_and_Borders/Using_CSS_multiple_backgrounds

I'm guessing the rule isn't handling multiple values for background-position correctly?

Error when parsing UTF-8 file with BOM

After the update to sonar-css-plugin 3.1 we get the error down below which breaks the full analysis of our projects. The error is gone if I remove the BOM-Header of the UTF-8 file.

I think such an error shouldn't break the hole analysis but only the one of this file. Also should the analyzer be able to run with a UTF-8 file with BOM.

org.sonar.squidbridge.api.AnalysisException: Unable to analyze file: C:/trunk/PGM/Orca.Ade.OfflineViewer/Client/offline/css/kunden_default.css
at org.sonar.plugins.css.AbstractLanguageAnalyzerSensor.analyzeFile(AbstractLanguageAnalyzerSensor.java:148)
at org.sonar.plugins.css.AbstractLanguageAnalyzerSensor.execute(AbstractLanguageAnalyzerSensor.java:111)
at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:87)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:81)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:67)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:75)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:178)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:259)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:254)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:252)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:243)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:118)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:117)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalArgumentException: Unable to highlight file [moduleKey=ORCA:ORCA:9BCF20CC-E58F-43EF-8450-C4B49403E885, relative=Client/offline/css/kunden_default.css, basedir=C:\trunk\PGM\Orca.Ade.OfflineViewer]
at org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.highlight(DefaultHighlighting.java:97)
at org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.highlight(DefaultHighlighting.java:37)
at org.sonar.css.visitors.highlighter.CssSyntaxHighlighterVisitor.highlight(CssSyntaxHighlighterVisitor.java:112)
at org.sonar.css.visitors.highlighter.CssSyntaxHighlighterVisitor.highlightComments(CssSyntaxHighlighterVisitor.java:117)
at org.sonar.css.visitors.highlighter.CssSyntaxHighlighterVisitor.visitNode(CssSyntaxHighlighterVisitor.java:103)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:76)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:96)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:78)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:96)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:78)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:96)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:78)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:96)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:78)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:96)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:78)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:96)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:78)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.scanTree(SubscriptionVisitor.java:70)
at org.sonar.plugins.css.api.visitors.SubscriptionVisitor.scanTree(SubscriptionVisitor.java:64)
at org.sonar.plugins.css.AbstractLanguageAnalyzerSensor.scanFile(AbstractLanguageAnalyzerSensor.java:163)
at org.sonar.plugins.css.AbstractLanguageAnalyzerSensor.analyzeFile(AbstractLanguageAnalyzerSensor.java:138)
... 33 more
Caused by: java.lang.IllegalArgumentException: 37 is not a valid line offset for pointer. File [moduleKey=ORCA:ORCA:9BCF20CC-E58F-43EF-8450-C4B49403E885, relative=Client/offline/css/kunden_default.css, basedir=C:\trunk\PGM\Orca.Ade.OfflineViewer] has 36 character(s) at line 1576
at org.sonar.api.internal.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:292)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:226)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newRange(DefaultInputFile.java:242)
at org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.highlight(DefaultHighlighting.java:95)
... 54 more

nth-of-type selector problem in less scan

Sonar rises issues with following less snippet:

span:nth-of-type(2) { width: 4.6%; display: inline-block; text-align: center; }

Theses issues are:

  • Remove this usage of the unknown "span" property.
  • Remove this usage of the unknown "nth-of-type" function.
  • Add a semicolon at the end of this declaration
  • Add one whitespace between the colon and the value

Thats wrong as less code is correct.

:not selector problem in less scan

Hi @racodond ,
I'm using version 4.4 of plugin. Sonar rises issue with following less snippet:

tr:not(.big-container) > { width: 100px; }

Theese issues are:

  • Remove this usage of the unknown "tr" property.
  • Remove this usage of the unknown "not" function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.