- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个grails项目 CodeNarc Plugin安装并生成 xml 报告。使用以下配置和版本安装并配置了 SonarQube:
Grails 2.3.7
SonarQube 服务器 - 4.5
SonarQube Runner- 2.4
CodeNarc 插件 - 0.22
Sonar-project.properties 文件包含
#sonar-runner.properties
sonar.projectKey=key
sonar.projectName=Project Name
sonar.projectVersion=1.0
sonar.sources=src, grails-app/services, grails-app/controllers, grails-app/domain
sonar.tests=test/
sonar.language=grvy
sonar.sourceEncoding=UTF-8
sonar.groovy.codenarc.reportPath=target/codenarc/codeNarcXMLReport.xml
生成 CodeNarc XML 报告并在文件中添加其报告路径。 Sonar 运行器分析项目,但零问题
Sonar 运行程序无法索引资源并针对违反 CodeNarc 规则发出警告。
SonarQube Runner 2.4
Java 1.7.0_21 Oracle Corporation (64-bit)
Linux 3.11.0-26-generic amd64
INFO: Runner configuration file: /media/Others/softwares/sonar-runner-2.4/conf/sonar-runner.properties
INFO: Project configuration file: /media/Others/repo/project/sonar-project.properties
INFO: Default locale: "en_IN", source code encoding: "UTF-8"
INFO: Work directory: /media/Others/repo/project/./.sonar
INFO: SonarQube Server 4.5
11:20:57.146 INFO - Load global referentials...
11:20:57.356 INFO - Load global referentials done: 213 ms
11:20:57.367 INFO - User cache: /home/.sonar/cache
11:20:57.378 INFO - Install plugins
11:20:57.680 INFO - Install JDBC driver
11:20:57.688 INFO - Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
11:20:59.590 INFO - Initializing Hibernate
11:21:01.310 INFO - Load project referentials...
11:21:02.342 INFO - Load project referentials done: 1032 ms
11:21:02.342 INFO - Load project settings
11:21:03.193 INFO - Loading technical debt model...
11:21:03.218 INFO - Loading technical debt model done: 25 ms
11:21:03.222 INFO - Apply project exclusions
11:21:03.598 INFO - ------------- Scan project
11:21:03.603 INFO - Load module settings
11:21:04.228 INFO - Language is forced to grvy
11:21:04.230 INFO - Loading rules...
11:21:05.224 INFO - Loading rules done: 994 ms
11:21:05.260 INFO - Configure Maven plugins
11:21:05.537 INFO - Compare to previous analysis (2014-12-23)
11:21:05.557 INFO - Compare over 30 days (2014-11-23, analysis of 2014-11-10 17:20:47.0)
11:21:05.578 INFO - Compare to previous version (2014-10-30)
11:21:05.636 INFO - Loaded quality gate 'SonarQube way'
11:21:05.817 INFO - Base dir: /media/Others/repo/project/.
11:21:05.817 INFO - Working dir: /media/Others/repo/project/./.sonar
11:21:05.818 INFO - Source paths: src, grails-app/services, grails-app/controllers, grails-app/domain
11:21:05.818 INFO - Test paths: test
11:21:05.818 INFO - Source encoding: UTF-8, default locale: en_IN
11:21:05.818 INFO - Index files
11:21:06.276 INFO - 226 files indexed
11:21:44.020 INFO - Quality profile for grvy: Sonar way
11:21:44.404 INFO - Sensor QProfileSensor...
11:21:44.416 INFO - Sensor QProfileSensor done: 13 ms
11:21:44.416 INFO - Sensor CodeNarc...
11:21:44.593 WARN - No such rule in Sonar, so violation from CodeNarc will be ignored:
11:21:44.594 WARN - No such rule in Sonar, so violation from CodeNarc will be ignored:
11:21:44.595 WARN - No such rule in Sonar, so violation from CodeNarc will be ignored:
11:21:44.596 WARN - No such rule in Sonar, so violation from CodeNarc will be ignored:
11:21:44.599 WARN - Resource is not indexed. Ignoring violation org.sonar.api.rules.Violation@221
[resource=org.sonar.api.resources.File@4254e18d[key=<null>,deprecatedKey=grails-app/controllers/LoginController.groovy,path=<null>,
dir=grails-app/controllers,filename=LoginController.groovy,language=<null>],rule=Rule[id=427,name=Catch
Exception,key=org.codenarc.rule.exceptions.CatchExceptionRule,configKey=CatchException,plugin=grvy,severity=MINOR,isTemplate=false,status=READY,language=grvy,template=<null>],
message=The type Exception should not be caught,severity=<null>,lineId=93,cost=<null>,createdAt=<null>,switchedOff=false,
checksum=<null>,isNew=false,isManual=false,permanentId=<null>,personId=<null>]
11:21:44.602 WARN - Resource is not indexed. Ignoring violation org.sonar.api.rules.Violation@5e3666d9[resource=org.sonar.api.resources.File@459a60e1[key=<null>,
deprecatedKey=grails-app/controllers/LoginController.groovy,path=<null>,dir=grails-app/controllers,filename=LoginController.groovy,language=<null>],rule=Rule[id=431,name=Unused Method Parameter,key=org.codenarc.rule.unused.UnusedMethodParameterRule,configKey=UnusedMethodParameter,
plugin=grvy,severity=MINOR,isTemplate=false,status=READY,language=grvy,template=<null>],
message=Violation in class LoginController. Method parameter [newSignup] is never referenced in the method authComplete of class LoginController,severity=<null>,lineId=100,cost=<null>,createdAt=<null>,
switchedOff=false,checksum=<null>,isNew=false,isManual=false,permanentId=<null>,personId=<null>]
...
...
...
11:21:45.661 WARN - Resource is not indexed. Ignoring violation org.sonar.api.rules.Violation@6c95883d[resource=org.sonar.api.resources.File@4d23947c[key=<null>,deprecatedKey=test/unit/project/HomeControllerTests.groovy,
path=<null>,dir=test/unit/project,filename=HomeControllerTests.groovy,language=<null>],rule=Rule[id=643,name=Empty Method,key=org.codenarc.rule.basic.EmptyMethodRule,configKey=EmptyMethod,plugin=grvy,
severity=MINOR,isTemplate=false,status=READY,language=grvy,template=<null>],
message=Violation in class HomeControllerTests. The method tearDown is both empty and not marked with @Override,severity=<null>,lineId=121,cost=<null>,createdAt=<null>,switchedOff=false,checksum=<null>,
isNew=false,isManual=false,permanentId=<null>,personId=<null>]
11:21:45.661 INFO - Sensor CodeNarc done: 1245 ms
11:21:45.662 INFO - Sensor GroovySensor...
11:21:48.552 INFO - GMetrics completed: 1493ms
11:21:49.580 INFO - GMetrics completed: 941ms
11:21:51.285 INFO - GMetrics completed: 1601ms
11:21:51.561 INFO - GMetrics completed: 156ms
11:21:52.081 INFO - GMetrics completed: 488ms
11:21:52.167 INFO - Sensor GroovySensor done: 6505 ms
11:21:52.167 INFO - Sensor Groovy CoberturaSensor...
11:21:52.167 INFO - Analyzing Cobertura report: target/test-reports/cobertura/coverage.xml
11:21:52.955 INFO - Sensor Groovy CoberturaSensor done: 788 ms
11:21:52.956 INFO - Sensor ScmActivitySensor...
11:21:52.956 INFO - Trying to guess scm provider from project layout...
11:21:52.956 INFO - Found SCM type: git
11:21:52.958 INFO - Retrieve SCM blame information with encoding UTF-8...
11:21:55.580 INFO - Retrieve SCM blame information with encoding UTF-8 done: 2622 ms
11:21:55.581 INFO - Sensor ScmActivitySensor done: 2625 ms
11:21:55.585 INFO - Sensor InitialOpenIssuesSensor...
11:21:55.597 INFO - Sensor InitialOpenIssuesSensor done: 11 ms
11:21:55.597 INFO - Sensor ProjectLinksSensor...
11:21:55.607 INFO - Sensor ProjectLinksSensor done: 10 ms
11:21:55.608 INFO - Sensor VersionEventsSensor...
11:21:55.733 INFO - Sensor VersionEventsSensor done: 125 ms
11:21:55.733 INFO - Sensor FileHashSensor...
11:21:55.743 INFO - Sensor FileHashSensor done: 9 ms
11:21:55.743 INFO - Sensor CPD Sensor (wrapped)...
11:21:55.743 INFO - DefaultCpdEngine is used for grvy
11:21:55.751 INFO - Cross-project analysis disabled
11:21:56.330 INFO - Sensor CPD Sensor (wrapped) done: 587 ms
11:21:56.918 INFO - Execute decorators...
11:22:01.785 INFO - Store results in database
11:22:10.256 INFO - ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/project
11:22:10.392 INFO - Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
11:22:10.393 INFO - Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
11:22:10.461 INFO - Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
11:22:10.473 INFO - -> Keep one snapshot per day between 2014-11-25 and 2014-12-22
11:22:10.475 INFO - -> Keep one snapshot per week between 2013-12-24 and 2014-11-25
11:22:10.475 INFO - -> Keep one snapshot per month between 2009-12-29 and 2013-12-24
11:22:10.476 INFO - -> Delete data prior to: 2009-12-29
11:22:10.482 INFO - -> Clean project [id=225]
11:22:10.487 INFO - <- Clean snapshot 8702
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
Total time: 1:15.303s
Final Memory: 26M/737M
INFO: ------------------------------------------------------------------------
我已经在 SonarQube Server 中安装了所有必需的插件 完成所有配置后,为什么这些规则被忽略并且为项目生成零问题?
最佳答案
我也遇到了同样的问题,从 Codenarc 报告中生成了被忽略的问题。我在 sonarqube Nabble 服务中发现了类似的主题,可能从路径属性的 codenarc 报告中删除每个“grails-app/domain/”、“grails-app/services/”等将解决问题,但这只是问题的根源问题,没有关于如何自动完成的内容。下面我在文章中附上了这篇文章的链接。 http://sonarqube.15.x6.nabble.com/No-Issues-and-code-coverage-for-groovy-in-multi-language-project-with-SonarQube-4-2-tp5023761p5023806.html
关于grails - Sonar 运行器 codenarc 传感器忽略 Codenarc 的违规行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27614985/
好的,所以我想从批处理文件运行我的整个工作环境... 我想要实现什么...... 打开新的 powershell,打开我的 API 文件夹并从该文件夹运行 VS Code 编辑器(cd c:\xy;
我正在查看 Cocoa Controls 上的示例并下载了一些演示。我遇到的问题是一些例子,比如 BCTabBarController ,不会在我的设备上构建或启动。当我打开项目时,它看起来很正常,没
我刚刚开始学习 C 语言(擅长 Java 和 Python)。 当编写 C 程序(例如 hello world)时,我在 ubuntu cmd 行上使用 gcc hello.c -o hello 编译
我在 php 脚本从 cron 开始运行到超时后注意到了这个问题,但是当它从命令行手动运行时这不是问题。 (对于 CLI,PHP 默认的 max_execution_time 是 0) 所以我尝试运行
我可以使用命令行运行测试 > ./node_modules/.bin/wdio wdio.conf.js 但是如果我尝试从 IntelliJ 的运行/调试配置运行它,我会遇到各种不同的错误。 Fea
Error occurred during initialization of VM. Could not reserve enough space for object heap. Error: C
将 Anaconda 安装到 C:\ 后,我无法打开 jupyter 笔记本。无论是在带有 jupyter notebook 的 Anaconda Prompt 中还是在导航器中。我就是无法让它工作。
我遇到一个问题,如果我双击我的脚本 (.py),或者使用 IDLE 打开它,它将正确编译并运行。但是,如果我尝试在 Windows 命令行中运行脚本,请使用 C:\> "C:\Software_Dev
情况 我正在使用 mysql 数据库。查询从 phpmyadmin 和 postman 运行 但是当我从 android 发送请求时(它返回零行) 我已经记录了从 android 发送的电子邮件是正确
所以这个有点奇怪 - 为什么从 Java 运行 .exe 文件会给出不同的输出而不是直接运行 .exe。 当 java 在下面的行执行时,它会调用我构建的可与 3CX 电话系统配合使用的 .exe 文
这行代码 Environment.Is64BitProcess 当我的应用单独运行时评估为真。 但是当它在我的 Visual Studio 单元测试中运行时,相同的表达式的计算结果为 false。 我
关闭。这个问题是opinion-based .它目前不接受答案。 想要改进这个问题? 更新问题,以便 editing this post 可以用事实和引用来回答它. 关闭 8 年前。 Improve
我写了一个使用 libpq 连接到 PostgreSQL 数据库的演示。 我尝试通过包含将 C 文件连接到 PostgreSQL #include 在我将路径添加到系统变量 I:\Program F
如何从 Jenkins 运行 Android 模拟器来运行我的测试?当我在 Execiute Windows bath 命令中写入时,运行模拟器的命令: emulator -avd Tester 然后
我已经配置好东西,这样我就可以使用 ssl 登录和访问在 nginx 上运行的 errbit 我的问题是我不知道如何设置我的 Rails 应用程序的 errbit.rb 以便我可以运行测试 nginx
我编写了 flutter 应用程序,我通过 xcode 打开了 ios 部分并且应用程序正在运行,但是当我通过 flutter build ios 通过 vscode 运行应用程序时,我得到了这个错误
我有一个简短的 python 脚本,它使用日志记录模块和 configparser 模块。我在Win7下使用PyCharm 2.7.1和Python 3.3。 当我使用 PyCharm 运行我的脚本时
我在这里遇到了一些难题。 我的开发箱是 64 位的,windows 7。我所有的项目都编译为“任何 CPU”。该项目引用了 64 位版本的第 3 方软件 当我运行不使用任何 Web 引用的单元测试时,
当我注意到以下问题时,我正在做一些 C++ 练习。给定的代码将不会在 Visual Studio 2013 或 Qt Creator 5.4.1 中运行/编译 报错: invalid types 'd
假设我有一个 easteregg.py 文件: from airflow import DAG from dateutil import parser from datetime import tim
我是一名优秀的程序员,十分优秀!