简体   繁体   English

忽略声纳 CSS 规则

[英]Ignore Sonar CSS rule

I am running Sonarqube scan on my angular 7 application and i see that Sonar report is complaining " Unexpected unknown pseudo-element selector "::ng-deep" ", does any one know how to mark this rule as ignore or remove this rule.我在我的angular 7应用程序上运行Sonarqube扫描,我看到声纳报告抱怨“意外的未知伪元素选择器“::ng-deep” “,有人知道如何将此规则标记为忽略或删除此规则。

I tried using //NOSONAR , but no luck.我尝试使用//NOSONAR ,但没有运气。

Create a new quality profile and add rules you want and apply on the project.创建一个新的质量配置文件并添加您想要并应用于项目的规则。 or exclude that rule from current applied quality profile或从当前应用的质量配置文件中排除该规则

Sonarqube does not allow us to edit the root profile so need to create copy of the same.Once a copy of same profile being created then can deactivate the desired rule. Sonarqube 不允许我们编辑根配置文件,因此需要创建相同的副本。一旦创建了相同配置文件的副本,就可以停用所需的规则。 Imp point to note in order the sonarqube picks the copied version make it default. Imp 点要注意,以便 sonarqube 选择复制的版本使其默认。

To create a copy of rule:-要创建规则副本:-

Quality Profiles > select the profile > right click on setting icons > select copy option from dropdown > edit the copied version > make it default质量配置文件 > 选择配置文件 > 右键单击​​设置图标 > 从下拉列表中选择复制选项 > 编辑复制的版本 > 将其设为默认值

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM