From 731a35517c087633b0b6da7bd48f51f0e3d9c9ca Mon Sep 17 00:00:00 2001 From: realstealthninja Date: Sun, 29 Nov 2026 23:34:10 +0000 Subject: [PATCH] Documentation for 687d879c7a356945f46db6e1ca39afa82fbeda08 --- d6/d02/file__linter_8py_source.html | 68 ++++++++++++++--------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/d6/d02/file__linter_8py_source.html b/d6/d02/file__linter_8py_source.html index c61bb24c1..89786ba5e 100644 --- a/d6/d02/file__linter_8py_source.html +++ b/d6/d02/file__linter_8py_source.html @@ -121,40 +121,40 @@ document.addEventListener('DOMContentLoaded',() => { initNavTree('d6/d02/file__l
file_linter.py
-
1import os
-
2import subprocess
-
3import sys
-
4
-
5print("Python {}.{}.{}".format(*sys.version_info)) # Python 3.8
-
6with open("git_diff.txt") as in_file:
-
7 modified_files = sorted(in_file.read().splitlines())
-
8 print(f"{len(modified_files)} files were modified.")
-
9
-
10 cpp_exts = (
-
11 ".c",
-
12 ".c++",
-
13 ".cc",
-
14 ".cpp",
-
15 ".cu",
-
16 ".cuh",
-
17 ".cxx",
-
18 ".h",
-
19 ".h++",
-
20 ".hh",
-
21 ".hpp",
-
22 ".hxx",
-
23 )
-
24 cpp_files = [file for file in modified_files if file.lower().endswith(cpp_exts)]
-
25 print(f"{len(cpp_files)} C++ files were modified.")
-
26 if not cpp_files:
-
27 sys.exit(0)
-
28
-
29 _ = subprocess.run(
-
30 [
-
31 "clang-tidy",
-
32 "--fix",
-
33 "-p=build",
-
34 "--extra-arg=-std=c++11",
+
1#!/usr/bin/env python3
+
2import os
+
3import subprocess
+
4import sys
+
5
+
6print("Python {}.{}.{}".format(*sys.version_info)) # Python 3.8
+
7with open("git_diff.txt") as in_file:
+
8 modified_files = sorted(in_file.read().splitlines())
+
9 print(f"{len(modified_files)} files were modified.")
+
10
+
11 cpp_exts = (
+
12 ".c",
+
13 ".c++",
+
14 ".cc",
+
15 ".cpp",
+
16 ".cu",
+
17 ".cuh",
+
18 ".cxx",
+
19 ".h",
+
20 ".h++",
+
21 ".hh",
+
22 ".hpp",
+
23 ".hxx",
+
24 )
+
25 cpp_files = [file for file in modified_files if file.lower().endswith(cpp_exts)]
+
26 print(f"{len(cpp_files)} C++ files were modified.")
+
27 if not cpp_files:
+
28 sys.exit(0)
+
29
+
30 _ = subprocess.run(
+
31 [
+
32 "clang-tidy",
+
33 "--fix",
+
34 "-p=build",
35 *cpp_files,
36 "--",
37 ],