最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to surpress SonarQube JavaScript issues - Stack Overflow

programmeradmin0浏览0评论
module.exports = function (grunt) { // NOSONAR

grunt.initConfig({

Unfortunately Sonar detects a false positive when it es to certain functions like this one (or AMD module definitions).

The rule in question is: "Functions should not have too many lines"

The // NOSONAR or //NOSONAR approach does not work for some reason.

Can somebody provide me with a valid work-around? This rule cannot be deactivated on a file-to-file bases since it is triggered for all AMD modules as well.

SonarQube version: 3.7.4 - Sonar-Runner: 2.4

Thank you!

module.exports = function (grunt) { // NOSONAR

grunt.initConfig({

Unfortunately Sonar detects a false positive when it es to certain functions like this one (or AMD module definitions).

The rule in question is: "Functions should not have too many lines"

The // NOSONAR or //NOSONAR approach does not work for some reason.

Can somebody provide me with a valid work-around? This rule cannot be deactivated on a file-to-file bases since it is triggered for all AMD modules as well.

SonarQube version: 3.7.4 - Sonar-Runner: 2.4

Thank you!

Share Improve this question asked Oct 20, 2015 at 11:42 Eiden EidenEiden Eiden 872 silver badges7 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 4

Javascript plugin provides "NOSONAR" mechanism since 2.2 version (see https://jira.sonarsource./browse/SONARJS-294).

And since v2.6 there is improvement of this rule "Functions should not have too many lines" to ignore AMD pattern (see https://jira.sonarsource./browse/SONARJS-404)

So update of Javascript plugin should work.

发布评论

评论列表(0)

  1. 暂无评论