【发布时间】:2018-07-04 08:39:01
【问题描述】:
我有 sonaqube 服务器和单独的 teamcity 服务器,我在 teamcity 配置中添加了一个步骤,以便在我的 css 代码存储库(在 bitbucket 中)上运行 sonar runner。
Sonarqube 服务器 - Sonarqube 6.7
添加插件 - sonarqube-6.7\extensions\plugins\sonar-css-plugin-4.13
我遇到了与 .css 文件上的声纳扫描相关的问题:
ERROR: Error during Sonar runner execution org.sonar.runner.impl.RunnerException: Unable to execute Sonar Caused by: org.sonar.squidbridge.api.AnalysisException: Unable to analyze file: E:/LocalAgent2/work/fe98ca8c22f54520/SourceCode/UI Design/Source/src/css/components.css
...
Caused by: org.sonar.squidbridge.api.AnalysisException: Unable to analyze file: E:/LocalAgent2/work/fe98ca8c22f54520/SourceCode/UI Design/Source/src/css/components.css
...
Caused by: java.lang.IllegalArgumentException: 17 is not a valid line offset for pointer. File css/components.css has 16 character(s) at line 351
我已将 .css 文件的格式从 UTF-8 更新为 UTF-8 BOM,然后此问题消失但出现解析错误问题。那就无法解析了,请帮忙。
ERROR - Unable to parse file: E:/LocalAgent4/work/fe98ca8c22f54520/SourceCode/UI Design/Source/src/css/components.css ERROR - Parse error at line 1 column 2:
...
Caused by: java.lang.IllegalArgumentException: 17 is not a valid line offset for pointer. File css/components.css has 16 character(s) at line 351
【问题讨论】:
-
我们可以看看你的 CSS 吗?特别是第 351 行。
-
已解决:实际问题是 UTF-8 编码。
标签: css sonarqube teamcity sonarqube-scan