-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #45 Add ::ng-deep pseudo-selector as obsolete
- Loading branch information
Showing
22 changed files
with
158 additions
and
30 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
11 changes: 11 additions & 0 deletions
11
css-checks/src/test/resources/checks/common/obsolete-pseudos/obsoletePseudos.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:any(ol, ul, menu, dir) { /* Noncompliant ![sc=2;ec=5;el=+0]! !{Remove this usage of the obsolete / not on W3C Standards track "any" pseudo.}! */ | ||
color: #000000; | ||
} | ||
|
||
::ng-deep { /* Noncompliant ![sc=3;ec=10;el=+0]! !{Remove this usage of the obsolete / not on W3C Standards track "ng-deep" pseudo.}! */ | ||
color: #000000; | ||
} | ||
|
||
p:empty { | ||
color: #000000; | ||
} |
11 changes: 11 additions & 0 deletions
11
css-checks/src/test/resources/checks/common/obsolete-pseudos/obsoletePseudos.less
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:any(ol, ul, menu, dir) { /* Noncompliant ![sc=2;ec=5;el=+0]! !{Remove this usage of the obsolete / not on W3C Standards track "any" pseudo.}! */ | ||
color: #000000; | ||
} | ||
|
||
::ng-deep { /* Noncompliant ![sc=3;ec=10;el=+0]! !{Remove this usage of the obsolete / not on W3C Standards track "ng-deep" pseudo.}! */ | ||
color: #000000; | ||
} | ||
|
||
p:empty { | ||
color: #000000; | ||
} |
11 changes: 11 additions & 0 deletions
11
css-checks/src/test/resources/checks/common/obsolete-pseudos/obsoletePseudos.scss
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:any(ol, ul, menu, dir) { /* Noncompliant ![sc=2;ec=5;el=+0]! !{Remove this usage of the obsolete / not on W3C Standards track "any" pseudo.}! */ | ||
color: #000000; | ||
} | ||
|
||
::ng-deep { /* Noncompliant ![sc=3;ec=10;el=+0]! !{Remove this usage of the obsolete / not on W3C Standards track "ng-deep" pseudo.}! */ | ||
color: #000000; | ||
} | ||
|
||
p:empty { | ||
color: #000000; | ||
} |
7 changes: 0 additions & 7 deletions
7
css-checks/src/test/resources/checks/common/obsoletePseudos.css
This file was deleted.
Oops, something went wrong.
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
31 changes: 31 additions & 0 deletions
31
css-frontend/src/main/java/org/sonar/css/model/pseudo/pseudoidentifier/standard/NgDeep.java
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* SonarQube CSS / SCSS / Less Analyzer | ||
* Copyright (C) 2013-2017 David RACODON | ||
* mailto: david.racodon@gmail.com | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3 of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
package org.sonar.css.model.pseudo.pseudoidentifier.standard; | ||
|
||
import org.sonar.css.model.pseudo.pseudoidentifier.StandardPseudoIdentifier; | ||
|
||
public class NgDeep extends StandardPseudoIdentifier { | ||
|
||
public NgDeep() { | ||
setObsolete(true); | ||
addLinks("https://angular.io/guide/component-styles#deprecated-deep--and-ng-deep"); | ||
} | ||
|
||
} |
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
11 changes: 11 additions & 0 deletions
11
its/ruling/projects/custom/common/obsolete-pseudos/obsoletePseudos.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:any(ol, ul, menu, dir) { /* Noncompliant ![sc=2;ec=5;el=+0]! !{Remove this usage of the obsolete / not on W3C Standards track "any" pseudo.}! */ | ||
color: #000000; | ||
} | ||
|
||
::ng-deep { /* Noncompliant ![sc=3;ec=10;el=+0]! !{Remove this usage of the obsolete / not on W3C Standards track "ng-deep" pseudo.}! */ | ||
color: #000000; | ||
} | ||
|
||
p:empty { | ||
color: #000000; | ||
} |
11 changes: 11 additions & 0 deletions
11
its/ruling/projects/custom/common/obsolete-pseudos/obsoletePseudos.less
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:any(ol, ul, menu, dir) { /* Noncompliant ![sc=2;ec=5;el=+0]! !{Remove this usage of the obsolete / not on W3C Standards track "any" pseudo.}! */ | ||
color: #000000; | ||
} | ||
|
||
::ng-deep { /* Noncompliant ![sc=3;ec=10;el=+0]! !{Remove this usage of the obsolete / not on W3C Standards track "ng-deep" pseudo.}! */ | ||
color: #000000; | ||
} | ||
|
||
p:empty { | ||
color: #000000; | ||
} |
11 changes: 11 additions & 0 deletions
11
its/ruling/projects/custom/common/obsolete-pseudos/obsoletePseudos.scss
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:any(ol, ul, menu, dir) { /* Noncompliant ![sc=2;ec=5;el=+0]! !{Remove this usage of the obsolete / not on W3C Standards track "any" pseudo.}! */ | ||
color: #000000; | ||
} | ||
|
||
::ng-deep { /* Noncompliant ![sc=3;ec=10;el=+0]! !{Remove this usage of the obsolete / not on W3C Standards track "ng-deep" pseudo.}! */ | ||
color: #000000; | ||
} | ||
|
||
p:empty { | ||
color: #000000; | ||
} |
This file was deleted.
Oops, something went wrong.
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
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,5 +1,6 @@ | ||
{ | ||
'project:custom/common/obsoletePseudos.css':[ | ||
'project:custom/common/obsolete-pseudos/obsoletePseudos.css':[ | ||
1, | ||
5, | ||
], | ||
} |
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
6 changes: 6 additions & 0 deletions
6
its/ruling/tests/src/test/expected/less-obsolete-pseudos.json
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
'project:custom/common/obsolete-pseudos/obsoletePseudos.less':[ | ||
1, | ||
5, | ||
], | ||
} |
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
6 changes: 6 additions & 0 deletions
6
its/ruling/tests/src/test/expected/scss-obsolete-pseudos.json
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
'project:custom/common/obsolete-pseudos/obsoletePseudos.scss':[ | ||
1, | ||
5, | ||
], | ||
} |
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