[all-commits] [llvm/llvm-project] 32ab79: [clang-tidy] Fix add_new_check.py to generate corr...

Kirill Bobyrev via All-commits all-commits at lists.llvm.org
Tue Oct 5 09:10:10 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 32ab79ebc496d73cb0eb3ad3b54d32b00fc49ba1
      https://github.com/llvm/llvm-project/commit/32ab79ebc496d73cb0eb3ad3b54d32b00fc49ba1
  Author: Matt Beardsley <mbeardsl at mathworks.com>
  Date:   2021-10-05 (Tue, 05 Oct 2021)

  Changed paths:
    M clang-tools-extra/clang-tidy/add_new_check.py

  Log Message:
  -----------
  [clang-tidy] Fix add_new_check.py to generate correct list.rst autofix column from relative path

Previously, the code in add_new_check.py that looks for fixit keywords in check source files when generating list.rst assumed that the script would only be called from its own path. That means it doesn't find any source files for the checks it's attempting to scan for, and it defaults to writing out nothing in the "Offers fixes" column for all checks. Other parts of add_new_check.py work from other paths, just not this part.

After this fix, add_new_check.py's "offers fixes" column generation for list.rst will be consistent regardless of what path it's called from by using the caller path that's deduced elsewhere already from sys.argv[0].

Reviewed By: kbobyrev

Differential Revision: https://reviews.llvm.org/D110600




More information about the All-commits mailing list