Sonarqube bash:vera++;Report2checkstyleReport.perl:未找到命令

Sonarqube bash:vera++;Report2checkstyleReport.perl:未找到命令,sonarqube,vera++,Sonarqube,Vera++,在Ubuntu-18.04上,我试图生成vera++报告以导入SonarQube。当它失败时,出现以下错误 bash -c 'find src -regex ".*\.cc\|.*\.hh" | vera++ - -showrules -nodup 2>&1 | vera++Report2checkstyleReport.perl > /sonar-test/valgrind-test/sonar-cxx/sonar-cxx-plugin/src/samp

Ubuntu-18.04
上,我试图生成
vera++报告以导入SonarQube
。当它失败时,出现以下错误

bash -c 'find src -regex ".*\.cc\|.*\.hh" | vera++ - -showrules -nodup 2>&1 | vera++Report2checkstyleReport.perl > /sonar-test/valgrind-test/sonar-cxx/sonar-cxx-plugin/src/samples/SampleProject2/build/vera++-report.xml'
bash: vera++Report2checkstyleReport.perl: command not found

我已经安装了
vera++-1.2.1
version。但是我没有
vera++Report2checkstyleReport.perl
文件。我需要单独下载吗?我可以解释一下这是如何工作的吗?

是的,我已经下载了下面的文件,现在它运行正常了

#! /usr/bin/env perl
#  An vera++ to checkstyle XML report generator for
# Copyright (C) 2010 - 2011, Neticoa SAS France - Tous droits réservés.
# Author(s) : Franck Bonin, Neticoa SAS France.
#
#  This Software is free software; you can redistribute it and/or
#  modify it under the terms of the GNU Lesser General Public
#  License as published by the Free Software Foundation; either
#  version 3 of the License, or (at your option) any later version.
# 
#  Sonar is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  Lesser General Public License for more details.
# 
#  You should have received a copy of the GNU Lesser General Public
#  License along with This Software; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
#  _________________________________________________________________________

use strict;

##my $rapport = $ARGV[0];
##chomp $rapport;
##open (DATAFILE, "$rapport") || die("Can't open $rapport\n");

my ($file,$line,$rule,$comment);

print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
print "<checkstyle version=\"5.0\">\n";

my $lastfile = "";
while (<STDIN>)
{
    chomp $_;
    ## replace '(RULENumber)' with 'RULENumber:'
    $_ =~ s/(.*) \((.*)\) (.*)/\1\2:\3/g;

    ($file,$line,$rule,$comment) = split(":", $_);

    my $severity = "error";

    $severity = "warning";
    #if ($rule =~ m/G.*/) { $severity = "ignore"; }
    #if ($rule =~ m/F.*/) { $severity = "info"; }
    #if ($rule =~ m/L.*/) { $severity = "warning"; }
    #if ($rule =~ m/T.*/) { $severity = "error"; }
    if ($file ne $lastfile)
    {
        if ($lastfile ne "")
        {
            print "\t</file>\n";
        }
        print "\t<file name=\"$file\">\n";
        $lastfile = $file;
    }
    print "\t\t<error line=\"$line\" severity=\"$severity\" message=\"$comment\" source=\"$rule\"/>\n";
}
if ($lastfile ne "")
{
    print "\t</file>\n";
}
print "</checkstyle>\n";
#/usr/bin/env perl
#vera++to checkstyle XML报表生成器
#版权所有(C)2010-2011,法国Neticoa SAS-Tous droits réservés。
#作者:Franck Bonin,法国Neticoa SAS。
#
#这个软件是自由软件;您可以重新分发它和/或
#根据GNU小公众的条款对其进行修改
自由软件基金会发布的许可证;任何一个
#许可证版本3,或(由您选择)任何更高版本。
# 
#声纳被分发,希望它会有用,
#但无任何保证;甚至没有任何关于
#适销性或适合某一特定目的。见GNU
#有关更多详细信息,请参阅较低的通用公共许可证。
# 
#您应该已经收到GNU Lesser General Public的副本
#本软件附带的许可证;如果没有,请写信给自由软件
基金会,51,富兰克林街,第五楼,波士顿,马02
#  _________________________________________________________________________
严格使用;
##我的$lapport=$ARGV[0];
##亲密关系;
##打开(数据文件,“$rapport”)| |死亡(“无法打开$rapport\n”);
我的($file、$line、$rule、$comment);
打印“\n”;
打印“\n”;
我的$lastfile=“”;
而()
{
大口大口;
##将“(规则编号)”替换为“规则编号:”
$\uz=~s/(.*)\(.*)\(.*)/\1\2:\3/g;
($file、$line、$rule、$comment)=拆分(“:”,$);
我的$severity=“error”;
$severity=“警告”;
#如果($rule=~m/G.*/){$severity=“ignore”;}
#如果($rule=~m/F.*/){$severity=“info”;}
#如果($rule=~m/L.*/){$severity=“warning”;}
#如果($rule=~m/T.*/){$severity=“error”;}
如果($file ne$lastfile)
{
如果($lastfile ne“”)
{
打印“\t\n”;
}
打印“\t\n”;
$lastfile=$file;
}
打印“\t\t\n”;
}
如果($lastfile ne“”)
{
打印“\t\n”;
}
打印“\n”;