Skip to content

Commit 0420018

Browse files
codingwithmaggaCopilot
andcommitted
Fix linting errors, don't analyze hpp files
Co-authored-by: Copilot <copilot@github.com>
1 parent 341c7c3 commit 0420018

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

cli/main.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <iostream>
2+
#include <span>
23
#include <string_view>
34
#include <vector>
45

@@ -8,9 +9,11 @@ int main(int argc, char* argv[])
89
{
910
std::vector<std::string_view> args;
1011
args.reserve(argc);
11-
for (int i = 0; i < argc; ++i)
12+
13+
const std::span<char*> arguments(argv, argc);
14+
for (char* arg : arguments)
1215
{
13-
args.emplace_back(argv[i]);
16+
args.emplace_back(arg);
1417
}
1518

1619
std::cout << cpuscope::format_message(args) << '\n';

scripts/lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ fi
99

1010
find . \
1111
\( -path ./build -o -path ./build-* -o -path ./.git -o -path ./scripts \) -prune \
12-
-o \( -name "*.cpp" -o -name "*.hpp" \) -print0 \
12+
-o \( -name "*.cpp" \) -print0 \
1313
| xargs -0 -n1 clang-tidy -p build

0 commit comments

Comments
 (0)