Skip to content

Commit e010007

Browse files
authored
Merge pull request #5929 from tautschnig/fix-cpplint-action
Make cpplint check actually work in CI
2 parents e166f4c + a5b3008 commit e010007

File tree

71 files changed

+152
-83
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+152
-83
lines changed

.github/workflows/pull-request-checks.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,8 @@ jobs:
364364
# user input
365365
DEBIAN_FRONTEND: noninteractive
366366
run: |
367-
pip install unidiff
367+
sudo apt-get update
368+
sudo apt-get install --no-install-recommends -yq python3-unidiff
368369
- name: Check updated lines of code meet linting standards
369370
env:
370371
BASE_BRANCH: ${{ github.base_ref }}

regression/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ add_subdirectory(validate-trace-xml-schema)
7272
add_subdirectory(cbmc-primitives)
7373
add_subdirectory(goto-interpreter)
7474
add_subdirectory(cbmc-sequentialization)
75+
add_subdirectory(cpp-linter)
7576

7677
if(WITH_MEMORY_ANALYZER)
7778
add_subdirectory(snapshot-harness)

regression/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ DIRS = cbmc \
4545
cbmc-primitives \
4646
goto-interpreter \
4747
cbmc-sequentialization \
48+
cpp-linter \
4849
# Empty last line
4950

5051
ifeq ($(OS),Windows_NT)

regression/cpp-linter/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
add_test_pl_tests("../../../scripts/cpplint.py")

regression/cpp-linter/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
default: tests.log
22

33
test:
4-
@../test.pl -p -c "python ../../../scripts/cpplint.py"
4+
@../test.pl -p -c ../../../scripts/cpplint.py
55

66
tests.log: ../test.pl
7-
@../test.pl -p -c "python ../../../scripts/cpplint.py"
7+
@../test.pl -p -c ../../../scripts/cpplint.py
88

99
show:
1010
@for dir in *; do \

regression/cpp-linter/assert/module_dependencies.txt

Whitespace-only changes.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
CORE
22
main.cpp
33

4-
^main\.cpp:8: assert is deprecated, use INVARIANT instead \[build/deprecated\] \[4\]
5-
^Total errors found: 1$
4+
^regression/cpp-linter/assert/main\.cpp:8: assert is deprecated, use UNREACHABLE instead \[build/deprecated\] \[4\]
5+
^# Total errors found: 1$
6+
^EXIT=1$
67
^SIGNAL=0$

regression/cpp-linter/catch-cast/module_dependencies.txt

Whitespace-only changes.

regression/cpp-linter/class-decl-space/main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ Author: Thomas Kiley, [email protected]
66
77
\*******************************************************************/
88

9+
// clang-format off
910
class temp_classt : public base_classt
1011
{}
1112

12-
class another_class : public base_classt
13+
class another_class: public base_classt
1314
{}
1415

15-
class more_class:public base_classt
16+
class more_class: public base_classt
1617
{}
1718

1819
class nonderived
@@ -41,3 +42,4 @@ class testt
4142
template<class U>
4243
void bar(U t);
4344
}
45+
// clang-format on

regression/cpp-linter/class-decl-space/module_dependencies.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)