forked from kalidasya/sonar-css
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #197 Log only one issue for rule vendor-prefix per rule set and p…
…er property
- Loading branch information
Showing
3 changed files
with
81 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 32 additions & 6 deletions
38
css-checks/src/test/resources/checks/vendorprefixwithstandard.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,42 @@ | ||
/* Compliant: Both vendor-prefix and standard property */ | ||
/* Compliant: Both vendor-prefix and standard properties */ | ||
.mybox { | ||
-moz-border-radius: 5px; | ||
border-radius: 5px; | ||
-moz-user-select: 5px; | ||
user-select: 5px; | ||
} | ||
|
||
/* Compliant: Both vendor-prefix and standard properties */ | ||
.mybox { | ||
-moz-user-select: 5px; | ||
-ms-user-select: 5px; | ||
-webkit-user-select: 5px; | ||
user-select: 5px; | ||
} | ||
|
||
/* Missing standard property */ | ||
.mybox { | ||
-moz-border-radius: 5px; /* Noncompliant ![sc=3;ec=21;el=+0]! !{Define the standard property after this vendor-prefixed property.}! */ | ||
-moz-user-select: 5px; /* Noncompliant ![sc=3;ec=19;el=+0]! !{Define the standard property after this vendor-prefixed property.}! */ | ||
} | ||
|
||
/* Standard property should come after vendor-prefixed property */ | ||
.mybox { | ||
border-radius: 5px; | ||
-webkit-border-radius: 5px; /* Noncompliant ![sc=3;ec=24;el=+0]! !{Define the standard property after this vendor-prefixed property.}! */ | ||
user-select: 5px; | ||
-webkit-user-select: 5px; /* Noncompliant ![sc=3;ec=22;el=+0]! !{Define the standard property after this vendor-prefixed property.}! */ | ||
} | ||
|
||
/* Standard property should come after all vendor-prefixed properties */ | ||
.mybox { | ||
user-select: 5px; | ||
-webkit-user-select: 5px; /* Noncompliant ![sc=3;ec=22;el=+0;secondary=+1,+3]! !{Define the standard property after this vendor-prefixed property.}! */ | ||
-ms-user-select: 5px; | ||
color: green; | ||
-moz-user-select: 5px; | ||
} | ||
|
||
/* Standard property should come after all vendor-prefixed properties */ | ||
.mybox { | ||
-ms-user-select: 5px; | ||
user-select: 5px; | ||
-webkit-user-select: 5px; /* Noncompliant ![sc=3;ec=22;el=+0;secondary=+2]! !{Define the standard property after this vendor-prefixed property.}! */ | ||
color: green; | ||
-moz-user-select: 5px; | ||
} |