Skip to content

Commit bc9c3df

Browse files
authored
lint: support cpplint 2.0 (#1049)
Current `poac` code fails `poac lint` with `cpplint` 2.0.0. This PR fixes this: ```console $ cpplint --version Cpplint fork (https://github.com/cpplint/cpplint) cpplint 2.0.0 Python 3.12.3 (main, Nov 6 2024, 18:32:19) [GCC 13.2.0] $ poac-out/debug/poac lint --exclude srcOld --exclude testsOld Linting poac src/BuildConfig.cc:19: <filesystem> is an unapproved C++17 header. [build/c++17] [5] Done processing src/BuildConfig.cc src/Command.cc:235: Add #include <string> for string [build/include_what_you_use] [4] Done processing src/Command.cc src/Command.hpp:4: <filesystem> is an unapproved C++17 header. [build/c++17] [5] Done processing src/Command.hpp src/Rustify/Aliases.hpp:4: <filesystem> is an unapproved C++17 header. [build/c++17] [5] Done processing src/Rustify/Aliases.hpp Total errors found: 4 Error: 'poac lint' failed with exit code `1` ```
1 parent 0fe8021 commit bc9c3df

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

poac.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ lto = true
2727
[lint.cpplint]
2828
filters = [
2929
"-build/c++11",
30+
"-build/c++17",
3031
"-build/include_order", # prioritize clang-format
3132
"-build/include_subdir",
3233
"-legal/copyright",

src/Command.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <cstdio>
1010
#include <cstdlib>
1111
#include <fcntl.h>
12+
#include <string>
1213
#include <sys/wait.h>
1314
#include <unistd.h>
1415
#include <vector>

0 commit comments

Comments
 (0)