[clang-tidy] adjust scripts to subsubsections in Release Notes
authorNathan James <n.james93@hotmail.co.uk>
Tue, 28 Jan 2020 18:09:53 +0000 (18:09 +0000)
committerNathan James <n.james93@hotmail.co.uk>
Tue, 28 Jan 2020 18:10:22 +0000 (18:10 +0000)
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

clang-tools-extra/clang-tidy/add_new_check.py
clang-tools-extra/clang-tidy/rename_check.py
clang-tools-extra/docs/ReleaseNotes.rst

index 4406efc..1ef7165 100755 (executable)
@@ -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.
 
index d5f2407..2dde973 100755 (executable)
@@ -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>`
index 58dbe08..f9dbcd0 100644 (file)
@@ -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