<legend id='SOPz8'><style id='SOPz8'><dir id='SOPz8'><q id='SOPz8'></q></dir></style></legend>
    <tfoot id='SOPz8'></tfoot>

      • <bdo id='SOPz8'></bdo><ul id='SOPz8'></ul>
    1. <i id='SOPz8'><tr id='SOPz8'><dt id='SOPz8'><q id='SOPz8'><span id='SOPz8'><b id='SOPz8'><form id='SOPz8'><ins id='SOPz8'></ins><ul id='SOPz8'></ul><sub id='SOPz8'></sub></form><legend id='SOPz8'></legend><bdo id='SOPz8'><pre id='SOPz8'><center id='SOPz8'></center></pre></bdo></b><th id='SOPz8'></th></span></q></dt></tr></i><div id='SOPz8'><tfoot id='SOPz8'></tfoot><dl id='SOPz8'><fieldset id='SOPz8'></fieldset></dl></div>

      <small id='SOPz8'></small><noframes id='SOPz8'>

      Sonarqube:缺少以下文件的责备信息

      时间:2024-05-09
        <legend id='Iq2jq'><style id='Iq2jq'><dir id='Iq2jq'><q id='Iq2jq'></q></dir></style></legend>
          <bdo id='Iq2jq'></bdo><ul id='Iq2jq'></ul>
            <tbody id='Iq2jq'></tbody>
        • <i id='Iq2jq'><tr id='Iq2jq'><dt id='Iq2jq'><q id='Iq2jq'><span id='Iq2jq'><b id='Iq2jq'><form id='Iq2jq'><ins id='Iq2jq'></ins><ul id='Iq2jq'></ul><sub id='Iq2jq'></sub></form><legend id='Iq2jq'></legend><bdo id='Iq2jq'><pre id='Iq2jq'><center id='Iq2jq'></center></pre></bdo></b><th id='Iq2jq'></th></span></q></dt></tr></i><div id='Iq2jq'><tfoot id='Iq2jq'></tfoot><dl id='Iq2jq'><fieldset id='Iq2jq'></fieldset></dl></div>

          1. <tfoot id='Iq2jq'></tfoot>

                <small id='Iq2jq'></small><noframes id='Iq2jq'>

              • 本文介绍了Sonarqube:缺少以下文件的责备信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                在 SonarQube 分析期间,我收到警告 Missing blame information for the following files.

                [INFO] [22:19:57.714] 传感器 SCM 传感器[INFO] [22:19:57.715] 这个项目的 SCM 提供者是:git[INFO] [22:19:57.715] 48 个文件待分析[INFO] [22:19:58.448] 分析了 0/48 个文件[警告] [22:19:58.448] 缺少以下文件的责备信息:(剪断48行)[警告] [22:19:58.449] 这可能会导致 SonarQube 中的功能丢失/损坏[信息] [22:19:58.449] 传感器 SCM 传感器(完成)|时间=735ms

                我正在使用 SonarQube 5.5,分析由 Maven 在 Jenkins 作业中对多模块 Java 项目完成.Git 插件 1.2 已安装.

                在 bash shell 中对任何有问题的文件手动运行 git blame 会产生预期的输出.

                我发现的相关问题都是关于 SVN,我的问题是 Git.

                如何获取有关 Sonarqube 的 git blame 信息?

                解决方案

                原因是 JGit 错误.JGit 不支持 .gitattributes.我有 ident在我的 .gitattributes 中.普通控制台 git 检查了源代码,在 $Id$ 宏上应用了 ident,但随后 JGit 忽略了这一点,并看到了一个不存在的差异承诺,实际上没有.

                SonarQube 邮件列表上的友好人士帮助了我,并建议使用 独立 JGit 命令行分发版:

                chmod +x/where/is/org.eclipse.jgit.pgm-<version>-r.sh/where/is/org.eclipse.jgit.pgm-<version>-r.sh blame -w/path/to/offending/file

                这个特殊的 JGit 错误已经超过 5 年没有得到解决,我不希望它会很快得到解决,所以我从所有来源中删除了 $Id$ 宏.p>

                这是我用来删除所有 $Id$ 宏的 (Bash) 代码:

                找到 */src -name "*.java" |xargs -n 1 sed -i '/$Id.*$/d'查找 */src -name "*.java" |xargs 混帐添加git commit -m "删除 $Id$ 宏"git 推送

                I am getting the warning Missing blame information for the following files during analysis by SonarQube.

                [INFO] [22:19:57.714] Sensor SCM Sensor
                [INFO] [22:19:57.715] SCM provider for this project is: git
                [INFO] [22:19:57.715] 48 files to be analyzed
                [INFO] [22:19:58.448] 0/48 files analyzed
                [WARN] [22:19:58.448] Missing blame information for the following files:
                (snip 48 lines)
                [WARN] [22:19:58.449] This may lead to missing/broken features in SonarQube
                [INFO] [22:19:58.449] Sensor SCM Sensor (done) | time=735ms
                

                I am using SonarQube 5.5, analysis is done by Maven in a Jenkins job, on a multi-module Java project. Git plugin 1.2 is installed.

                Manually running git blame in a bash shell, on any of the offending files, gives an expected output.

                Related questions I found were all about SVN, my issue is with Git.

                How do I get git blame information on Sonarqube?

                解决方案

                The cause was a JGit bug. JGit does not support .gitattributes. I had ident in my .gitattributes. Plain console git checked out the source, applied ident on $Id$ macros, but then JGit ignored that and saw a difference that wasn't committed, where there actually wasn't one.

                The friendly people on the SonarQube mailing list helped me out, and suggested debugging with the standalone JGit command line distribution:

                chmod +x /where/is/org.eclipse.jgit.pgm-<version>-r.sh
                /where/is/org.eclipse.jgit.pgm-<version>-r.sh blame -w /path/to/offending/file
                

                This particular JGit bug has not been solved for over 5 years and I have no hope that it will be solved anytime soon, so I removed the $Id$ macros from all my sources.

                This is the (Bash) code I used, to remove all $Id$ macros:

                find */src -name "*.java" | xargs -n 1 sed -i '/$Id.*$/d'
                find */src -name "*.java" | xargs git add
                git commit -m "Remove $Id$ macros"
                git push
                

                这篇关于Sonarqube:缺少以下文件的责备信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:使用 mvn sonar:sonar 运行声纳分析会忽略 sonar-project.properties 下一篇:“泄漏期"是什么意思?在 sonarQube 中是什么意思?

                相关文章

                <i id='zkAJ7'><tr id='zkAJ7'><dt id='zkAJ7'><q id='zkAJ7'><span id='zkAJ7'><b id='zkAJ7'><form id='zkAJ7'><ins id='zkAJ7'></ins><ul id='zkAJ7'></ul><sub id='zkAJ7'></sub></form><legend id='zkAJ7'></legend><bdo id='zkAJ7'><pre id='zkAJ7'><center id='zkAJ7'></center></pre></bdo></b><th id='zkAJ7'></th></span></q></dt></tr></i><div id='zkAJ7'><tfoot id='zkAJ7'></tfoot><dl id='zkAJ7'><fieldset id='zkAJ7'></fieldset></dl></div>

                <small id='zkAJ7'></small><noframes id='zkAJ7'>

                • <bdo id='zkAJ7'></bdo><ul id='zkAJ7'></ul>

                  <tfoot id='zkAJ7'></tfoot>
                  <legend id='zkAJ7'><style id='zkAJ7'><dir id='zkAJ7'><q id='zkAJ7'></q></dir></style></legend>