Merge pull request #8940 from paul-elliott-arm/add_fixes_to_threading_changelog

Add issues fixed to threading MVP changelog entry
diff --git a/scripts/code_style.py b/scripts/code_style.py
index 08ec4af..07952b6 100755
--- a/scripts/code_style.py
+++ b/scripts/code_style.py
@@ -51,6 +51,13 @@
     checks = re.findall(CHECK_CALL_RE, content)
     return frozenset(word for s in checks for word in s.split())
 
+# Check for comment string indicating an auto-generated file
+AUTOGEN_RE = re.compile(r"Warning[ :-]+This file is (now )?auto[ -]?generated",
+                        re.ASCII | re.IGNORECASE)
+def is_file_autogenerated(filename):
+    content = open(filename, encoding="utf-8").read()
+    return AUTOGEN_RE.search(content) is not None
+
 def get_src_files(since: Optional[str]) -> List[str]:
     """
     Use git to get a list of the source files.
@@ -85,7 +92,8 @@
     # generated files (we're correcting the templates instead).
     src_files = [filename for filename in src_files
                  if not (filename.startswith("3rdparty/") or
-                         filename in generated_files)]
+                         filename in generated_files or
+                         is_file_autogenerated(filename))]
     return src_files
 
 def get_uncrustify_version() -> str: