Skip to content

Commit

Permalink
feat(cpplint): Port cpplint to Python 3 (#629)
Browse files Browse the repository at this point in the history
- Replace Python 2 script with Python 3
- Update bootstrap script to comply with ShellCheck SC2038
  • Loading branch information
zenon8adams authored Aug 13, 2023
1 parent 9c25edb commit ffaa674
Show file tree
Hide file tree
Showing 5 changed files with 899 additions and 204 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-*,cppcoreguidelines-*,modernize-*,performance-*,portability-*,readability-*,misc-*,-modernize-use-trailing-return-type,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers'
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-*,cppcoreguidelines-*,modernize-*,performance-*,portability-*,readability-*,misc-*,-modernize-use-trailing-return-type,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers','-readability-identifier-length'
WarningsAsErrors: '*,-modernize-use-using'
FormatStyle: file
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run: |
sudo apt update
sudo apt build-dep -y .
sudo apt install -y clang clang-format clang-tidy python2
sudo apt install -y clang clang-format clang-tidy python3
- name: Compile
run: |
Expand Down
6 changes: 3 additions & 3 deletions cmake/check-code-style.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ else()
endif()
endif()

find_program(PYTHON_EXEC NAMES "python2")
find_program(PYTHON_EXEC NAMES "python3")
if(NOT PYTHON_EXEC)
message(WARNING "Check for python2: Not found, cpplint.py will not be executed")
message(WARNING "Check for python3: Not found, cpplint.py will not be executed")
else()
message(STATUS "Check for python2: Found")
message(STATUS "Check for python3: Found")
execute_process(
COMMAND ./cmake/run-cpplint-py.sh
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
Expand Down
Loading

0 comments on commit ffaa674

Please sign in to comment.