From: Nathan James Date: Tue, 28 Jan 2020 18:09:53 +0000 (+0000) Subject: [clang-tidy] adjust scripts to subsubsections in Release Notes X-Git-Tag: llvmorg-12-init~16600 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66e47a57205b1c2a6be3c89413ae9d47b747ed38;p=platform%2Fupstream%2Fllvm.git [clang-tidy] adjust scripts to subsubsections in Release Notes Summary: I added subsubsections for typical Clang-tidy entries in Release Notes, so now scripts are aware of this changes. I don't have GitHub commit access, so please commit changes. Reviewers: aaron.ballman, alexfh, hokein Reviewed By: alexfh Subscribers: njames93, xazax.hun, cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D72527 --- diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py index 4406efc..1ef7165 100755 --- a/clang-tools-extra/clang-tidy/add_new_check.py +++ b/clang-tools-extra/clang-tidy/add_new_check.py @@ -219,8 +219,8 @@ def add_release_notes(module_path, module, check_name): with open(filename, 'r') as f: lines = f.readlines() - lineMatcher = re.compile('Improvements to clang-tidy') - nextSectionMatcher = re.compile('Improvements to clang-include-fixer') + lineMatcher = re.compile('New checks') + nextSectionMatcher = re.compile('New check aliases') checkerMatcher = re.compile('- New :doc:`(.*)') print('Updating %s...' % filename) @@ -249,12 +249,12 @@ def add_release_notes(module_path, module, check_name): f.write(line) continue - if line.startswith('----'): + if line.startswith('^^^^'): f.write(line) continue if header_found and add_note_here: - if not line.startswith('----'): + if not line.startswith('^^^^'): f.write("""- New :doc:`%s ` check. diff --git a/clang-tools-extra/clang-tidy/rename_check.py b/clang-tools-extra/clang-tidy/rename_check.py index d5f2407..2dde973 100755 --- a/clang-tools-extra/clang-tidy/rename_check.py +++ b/clang-tools-extra/clang-tidy/rename_check.py @@ -176,11 +176,11 @@ def add_release_notes(clang_tidy_path, old_check_name, new_check_name): for line in lines: if not note_added: - match = re.search('Improvements to clang-tidy', line) + match = re.search('Renamed checks', line) if match: header_found = True elif header_found: - if not line.startswith('----'): + if not line.startswith('^^^^'): f.write(""" - The '%s' check was renamed to :doc:`%s ` diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index 58dbe08..f9dbcd0 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -88,8 +88,8 @@ New checks Flags use of the `C` standard library functions ``memset``, ``memcpy`` and ``memcmp`` and similar derivatives on non-trivial types. -New aliases -^^^^^^^^^^^ +New check aliases +^^^^^^^^^^^^^^^^^ - New alias :doc:`cert-dcl37-c ` to