[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] xen/misra: xen-analysis.py: use the relative path from the ...



On Thu, 4 May 2023, Luca Fancellu wrote:
> repository in the reports
> 
> Currently the cppcheck report entries shows the relative file path
> from the /xen folder of the repository instead of the base folder.
> In order to ease the checks, for example, when looking a git diff
> output and the report, use the repository folder as base.
> 
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>

Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Tested-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>


> ---
>  xen/scripts/xen_analysis/cppcheck_analysis.py | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/xen/scripts/xen_analysis/cppcheck_analysis.py 
> b/xen/scripts/xen_analysis/cppcheck_analysis.py
> index c3783e8df343..c8abbe0fca79 100644
> --- a/xen/scripts/xen_analysis/cppcheck_analysis.py
> +++ b/xen/scripts/xen_analysis/cppcheck_analysis.py
> @@ -149,7 +149,7 @@ def generate_cppcheck_deps():
>   --suppress='unusedStructMember:*'
>   --include={}/include/xen/config.h
>   -DCPPCHECK
> -""".format(settings.xen_dir, settings.outdir, settings.xen_dir)
> +""".format(settings.repo_dir, settings.outdir, settings.xen_dir)
>  
>      invoke_cppcheck = utils.invoke_command(
>              "{} --version".format(settings.cppcheck_binpath),
> @@ -240,7 +240,7 @@ def generate_cppcheck_report():
>      try:
>          cppcheck_report_utils.cppcheck_merge_txt_fragments(fragments,
>                                                             report_filename,
> -                                                           
> [settings.xen_dir])
> +                                                           
> [settings.repo_dir])
>      except cppcheck_report_utils.CppcheckTXTReportError as e:
>          raise CppcheckReportPhaseError(e)
>  
> @@ -257,7 +257,7 @@ def generate_cppcheck_report():
>          try:
>              cppcheck_report_utils.cppcheck_merge_xml_fragments(fragments,
>                                                                 xml_filename,
> -                                                               
> settings.xen_dir,
> +                                                               
> settings.repo_dir,
>                                                                 
> settings.outdir)
>          except cppcheck_report_utils.CppcheckHTMLReportError as e:
>              raise CppcheckReportPhaseError(e)
> @@ -265,7 +265,7 @@ def generate_cppcheck_report():
>          utils.invoke_command(
>              "{} --file={} --source-dir={} --report-dir={}/html --title=Xen"
>                  .format(settings.cppcheck_htmlreport_binpath, xml_filename,
> -                        settings.xen_dir, html_report_dir),
> +                        settings.repo_dir, html_report_dir),
>              False, CppcheckReportPhaseError,
>              "Error occured generating Cppcheck HTML report:\n{}"
>          )
> @@ -273,7 +273,7 @@ def generate_cppcheck_report():
>          html_files = utils.recursive_find_file(html_report_dir, r'.*\.html$')
>          try:
>              cppcheck_report_utils.cppcheck_strip_path_html(html_files,
> -                                                           (settings.xen_dir,
> +                                                           
> (settings.repo_dir,
>                                                              settings.outdir))
>          except cppcheck_report_utils.CppcheckHTMLReportError as e:
>              raise CppcheckReportPhaseError(e)
> -- 
> 2.34.1
> 



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.