Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small refactor to generalize config creation #1493

Merged
merged 1 commit into from
Apr 16, 2024

Small refactor to generalize config creation

52ae39a
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

Small refactor to generalize config creation #1493

Small refactor to generalize config creation
52ae39a
Select commit
Loading
Failed to load commit list.
GitHub Actions / clang-tidy-review completed Apr 6, 2024 in 0s

clang-tidy-review

There were 11 warnings

Details

src/contour/Config.cpp:184: warning: parameter name 'c' is too short, expected at least 3 characters [readability-identifier-length]
src/contour/Config.cpp:1836: warning: parameter name 'c' is too short, expected at least 3 characters [readability-identifier-length]
src/contour/Config.cpp:1901: warning: variable name '' is too short, expected at least 3 characters [readability-identifier-length]
src/contour/Config.cpp:2169: warning: variable name '
' is too short, expected at least 3 characters [readability-identifier-length]
src/contour/Config.h:890: warning: class 'Writer' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions]
src/contour/Config.h:922: warning: parameter name 'c' is too short, expected at least 3 characters [readability-identifier-length]
src/contour/Config.h:922: warning: all parameters should be named in a function [readability-named-parameter]
src/contour/Config.h:938: warning: the parameter 'doc' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
src/contour/Config.h:939: warning: performing an implicit widening conversion to type 'size_t' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result]
src/contour/Config.h:943: warning: the parameter 'doc' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
src/contour/Config.h:945: warning: performing an implicit widening conversion to type 'size_t' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result]

Annotations

Check warning on line 184 in src/contour/Config.cpp

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: parameter name 'c' is too short, expected at least 3 characters [readability-identifier-length]
```cpp
std::string createString(Config const& c)
                                       ^
```

Check warning on line 1836 in src/contour/Config.cpp

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: parameter name 'c' is too short, expected at least 3 characters [readability-identifier-length]
```cpp
std::string createString(Config const& c)
                                       ^
```

Check warning on line 1901 in src/contour/Config.cpp

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: variable name '_' is too short, expected at least 3 characters [readability-identifier-length]
```cpp
        const auto _ = typename Writer::Offset {};
                   ^
```

Check warning on line 2169 in src/contour/Config.cpp

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: variable name '_' is too short, expected at least 3 characters [readability-identifier-length]
```cpp
        const auto _ = typename Writer::Offset {};
                   ^
```

Check warning on line 890 in src/contour/Config.h

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: class 'Writer' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions]
```cpp
ct Writer
   ^
```

Check warning on line 922 in src/contour/Config.h

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: parameter name 'c' is too short, expected at least 3 characters [readability-identifier-length]
```cpp
st& c, T)
    ^
```

Check warning on line 922 in src/contour/Config.h

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: all parameters should be named in a function [readability-named-parameter]

```suggestion
st& c, T /*unused*/)
```

Check warning on line 938 in src/contour/Config.h

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: the parameter 'doc' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
```cpp
doc, T val)
^
```

Check warning on line 939 in src/contour/Config.h

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: performing an implicit widening conversion to type 'size_t' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result]
```cpp
 val)
                                                 ^
```
<details>
<summary>Additional context</summary>

**src/contour/Config.h:938:** make conversion explicit to silence this warning
```cpp
 val)
                                                 ^
```
**src/contour/Config.h:938:** perform multiplication in a wider type
```cpp
 val)
                                                 ^
```

</details>

Check warning on line 943 in src/contour/Config.h

See this annotation in the file changed.

@github-actions github-actions / clang-tidy-review

clang-tidy

warning: the parameter 'doc' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
```cpp
ename... T>
                                                ^
```