[clang-tools-extra] 66e47a5 - [clang-tidy] adjust scripts to subsubsections in Release Notes
Nathan James via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 28 10:10:28 PST 2020
Author: Nathan James
Date: 2020-01-28T18:10:22Z
New Revision: 66e47a57205b1c2a6be3c89413ae9d47b747ed38
URL: https://github.com/llvm/llvm-project/commit/66e47a57205b1c2a6be3c89413ae9d47b747ed38
DIFF: https://github.com/llvm/llvm-project/commit/66e47a57205b1c2a6be3c89413ae9d47b747ed38.diff
LOG: [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
Added:
Modified:
clang-tools-extra/clang-tidy/add_new_check.py
clang-tools-extra/clang-tidy/rename_check.py
clang-tools-extra/docs/ReleaseNotes.rst
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py
index 4406efc1b0f5..1ef7165a12c9 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
<clang-tidy/checks/%s>` check.
diff --git a/clang-tools-extra/clang-tidy/rename_check.py b/clang-tools-extra/clang-tidy/rename_check.py
index d5f24073496c..2dde9734ed54 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
<clang-tidy/checks/%s>`
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index 58dbe08343cb..f9dbcd0220d1 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
<clang-tidy/checks/cert-dcl37-c>` to
More information about the cfe-commits
mailing list