Skip to content

Commit 1709bee

Browse files
committed
fix: fix linting issues
1 parent 516d0c8 commit 1709bee

File tree

13 files changed

+61
-60
lines changed

13 files changed

+61
-60
lines changed

cspell.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ allowCompoundWords: true
1111
enableGlobDot: true
1212
words:
1313
- aarch
14+
- cmakelang
1415
- aminya
1516
- Amnet
1617
- anotherproj

tests/emscripten/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
#endif
1414

1515
int main() {
16-
printf("hello, world!\n");
17-
return 0;
16+
printf("hello, world!\n");
17+
return 0;
1818
}

tests/install/src/another_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
#include <mylib2/lib.hpp>
33

44
int main() {
5-
some_fun2();
6-
return some_fun2();
5+
some_fun2();
6+
return some_fun2();
77
}

tests/minimal/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <fmt/core.h>
22

33
int main() {
4-
fmt::print("Hello World!");
5-
return 0;
4+
fmt::print("Hello World!");
5+
return 0;
66
}

tests/myproj/include/mylib/lib.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
#include <cstring>
1919

2020
int some_fun() {
21-
fmt::print("Hello from fmt{}", "!");
21+
fmt::print("Hello from fmt{}", "!");
2222

23-
// populate an Eigen vector with the values
24-
auto eigen_vec = Eigen::VectorXd::LinSpaced(10, 0, 1);
23+
// populate an Eigen vector with the values
24+
auto eigen_vec = Eigen::VectorXd::LinSpaced(10, 0, 1);
2525

26-
// print the vector
27-
fmt::print("[{}]", fmt::join(eigen_vec, ", "));
26+
// print the vector
27+
fmt::print("[{}]", fmt::join(eigen_vec, ", "));
2828

29-
return 0;
29+
return 0;
3030
}

tests/myproj/libs/mythirdpartylib/include/Foo.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
namespace mythirdpartylib {
99

1010
class MYTHIRDPARTYLIB_EXPORT Foo {
11-
public:
12-
Foo() = default;
11+
public:
12+
Foo() = default;
1313

14-
/*implicit*/ Foo(int a) : m_a(a) {}
14+
/*implicit*/ Foo(int a) : m_a(a) {}
1515

16-
int a() const { return m_a; }
16+
int a() const { return m_a; }
1717

18-
void update(bool b, bool c, bool d);
19-
void bad(std::vector<std::string> &v);
18+
void update(bool b, bool c, bool d);
19+
void bad(std::vector<std::string> &v);
2020

21-
private:
22-
int m_a;
21+
private:
22+
int m_a;
2323
};
2424

25-
}// namespace mythirdpartylib
25+
} // namespace mythirdpartylib

tests/myproj/libs/mythirdpartylib/src/Foo.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
namespace mythirdpartylib {
44

55
void Foo::update(bool b, bool c, bool d) {
6-
int e = b + d;
7-
m_a = e;
6+
int e = b + d;
7+
m_a = e;
88
}
99

1010
void Foo::bad(std::vector<std::string> &v) {
11-
std::string val = "hello";
12-
int index = -1;// bad, plus should use gsl::index
13-
for (int i = 0; i < v.size(); ++i) {
14-
if (v[i] == val) {
15-
index = i;
16-
break;
17-
}
11+
std::string val = "hello";
12+
int index = -1; // bad, plus should use gsl::index
13+
for (int i = 0; i < v.size(); ++i) {
14+
if (v[i] == val) {
15+
index = i;
16+
break;
1817
}
18+
}
1919
}
2020

2121
static Foo foo(5);
2222
static Foo bar = 42;
2323

24-
}// namespace mythirdpartylib
24+
} // namespace mythirdpartylib

tests/myproj/src/main/main.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@
1616
#include <cstring>
1717

1818
int main() {
19-
fmt::print("Hello from fmt{}", "!");
19+
fmt::print("Hello from fmt{}", "!");
2020

21-
Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3);
22-
fmt::print("[{}]", fmt::join(eigen_vec, ", "));
21+
Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3);
22+
fmt::print("[{}]", fmt::join(eigen_vec, ", "));
2323

24-
#if !defined(__MINGW32__) && !defined(__MSYS__)// TODO fails
25-
Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1);
26-
fmt::print("[{}]", fmt::join(eigen_vec2, ", "));
24+
#if !defined(__MINGW32__) && !defined(__MSYS__) // TODO fails
25+
Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1);
26+
fmt::print("[{}]", fmt::join(eigen_vec2, ", "));
2727
#endif
2828

29-
// trigger address sanitizer
30-
// int *p = nullptr;
31-
// *p = 1;
29+
// trigger address sanitizer
30+
// int *p = nullptr;
31+
// *p = 1;
3232

33-
// trigger compiler warnings, clang-tidy, and cppcheck
34-
int a;
33+
// trigger compiler warnings, clang-tidy, and cppcheck
34+
int a;
3535
}

tests/myproj/src/mylib2/lib.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
#include <cstring>
1717

1818
int some_fun2() {
19-
fmt::print("Hello from fmt{}", "!");
19+
fmt::print("Hello from fmt{}", "!");
2020

21-
Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3);
22-
fmt::print("[{}]", fmt::join(eigen_vec, ", "));
21+
Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3);
22+
fmt::print("[{}]", fmt::join(eigen_vec, ", "));
2323

24-
#if !defined(__MINGW32__) && !defined(__MSYS__)// TODO fails
25-
Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1);
26-
fmt::print("[{}]", fmt::join(eigen_vec2, ", "));
24+
#if !defined(__MINGW32__) && !defined(__MSYS__) // TODO fails
25+
Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1);
26+
fmt::print("[{}]", fmt::join(eigen_vec2, ", "));
2727
#endif
2828

29-
return 0;
29+
return 0;
3030
}

tests/rpi3/main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ char uart_getc() { return 'a'; }
55
void uart_puts(char *s) {}
66

77
void main() {
8-
uart_init();
8+
uart_init();
99

10-
uart_puts("Hello World!\n");
10+
uart_puts("Hello World!\n");
1111

12-
while (1) {
13-
uart_send(uart_getc());
14-
}
12+
while (1) {
13+
uart_send(uart_getc());
14+
}
1515
}

0 commit comments

Comments
 (0)