adam-markovics commented on a change in pull request #1231:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1231#discussion_r778152089
##########
File path: thirdparty/google-styleguide/run_linter.py
##########
@@ -9,18 +13,50 @@
list_of_files = list()
for include_path in args.includePaths:
- for (dir_path, dir_names, file_names) in os.walk(include_path):
- for file_name in file_names:
- if (".h" in file_name) or (".cpp" in file_name):
- list_of_files += [os.path.join(dir_path, file_name)]
+ for (dir_path, dir_names, file_names) in os.walk(include_path):
+ for file_name in file_names:
+ if (".h" in file_name) or (".cpp" in file_name):
+ list_of_files += [os.path.join(dir_path, file_name)]
script_dir = os.path.dirname(os.path.realpath(__file__))
repository_path = os.path.abspath(os.path.join(script_dir, os.pardir,
os.pardir))
arg_list = list()
arg_list.append("--linelength=200")
arg_list.append("--repository=" + repository_path)
-if (args.quiet):
- arg_list.append("--quiet")
+if args.quiet:
+ arg_list.append("--quiet")
-cpplint.main(arg_list + list_of_files)
+
+def cpplint_main_wrapper(file_list):
+ try:
+ cpplint.main(arg_list + file_list)
+ return 0
+ except SystemExit as err:
+ return err.code
+
+ return 1
Review comment:
What happens if there is an exception that is not SystemExit?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]