2015-02-11 114 views
3

是否可以从Sonar的SCM责备数据收集中排除文件?从SonarQube SCM责任中排除文件?

我在这个路径下的文件:./projects/ichrg/ichrg.Web/bottombar.cs

在命令行SVN怪正常工作的文件,但是当我用声纳运行它,我得到以下错误:

java.lang.IllegalStateException:

The svn blame command:

svn blame --xml --non-interactive -x -w --username ******** --password ******** --trust-server-cert BottomBar.cs

failed:

svn: warning: W155010: The node 'D:\JenkinsBuilds\svntrunk\projects\ichrg\ichrg.Web\BottomBar.cs' was not found.

svn: E200009: Could not perform blame on all targets because some targets don't exist

哪听起来像它可能是一个svn问题。

现在,我只是想排除从SCM分析问题的文件,我添加了以下模式的“源文件排除”在门户网站属性,在“文件排除”:

**/bottombar*

但它继续尝试获取文件的责备数据。

有没有其他的我可以防止声纳试图为我的文件得到责备数据?

+0

另请参阅:https://stackoverflow.com/q/28740785/59087 – 2017-10-10 19:19:18

回答

4

文件排除是大小写敏感的,所以你应该做到以下几点,以排除文件:

sonar.exclusions=**/BottomBar.cs 

关于你这是关系到SCM信息最初的问题,SonarQube将大约在即将到来的这类故障不太严格5.1版本。请参阅“SONAR-6172 - Do not fail when a file has no blame information”。