-
Notifications
You must be signed in to change notification settings - Fork 10
feat(lint): Add tasks for linting C++ files with clang-tidy; Refactor tasks for linting C++ files (resolves #64). #125
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
Changes from 32 commits
e381d4c
6032e98
1caca4b
e4efbfa
d1560fb
3626dbe
7683363
aaa4b04
13f0bd7
7953b1f
1d2b8e5
27f5e32
c8fca75
af32abd
1523731
02ad628
49f7c25
b93fb26
9c7c838
f331277
dbc6663
e7e747f
da54c57
c8ba98c
834aea1
158543d
1753510
4428af4
802911c
0a0e3de
9d07d11
3ba6934
f25da50
2698e1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,6 +90,7 @@ Requirements: | |
| * [fmt] >= 8.0.1 | ||
| * [GSL] >= 4.0.0 | ||
| * [Task] >= 3.38 | ||
| * [uv] >= 0.7.10 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't match the version being installed. Is it suppose to be 0.8.4?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should reflect the minimum required version to work (uv in-particular is inherited from dev-utils). For CI we just use the latest stable so that we pick up any new changes. Ideally, we tested both sides (minimum and maximum versions), but it is awkward to setup.
Comment on lines
90
to
+93
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this need to reflect the llvm clang-tidy 20 install? |
||
|
|
||
| To build and install the project to `$HOME/.local`: | ||
|
|
||
|
|
@@ -153,45 +154,15 @@ is set to true and unit tests are built. | |
| Before submitting a PR, ensure you've run our linting tools and either fixed any violations or | ||
| suppressed the warning. | ||
|
|
||
| ### Requirements | ||
|
|
||
| We currently support running our linting tools on Linux and macOS. If you're developing on another | ||
| OS, you can submit a [feature request][feature-req]. If you can't run the linting workflows | ||
| locally, you can enable and run the [lint] workflow in your fork. | ||
|
|
||
| To run the linting tools, besides commonly installed tools like `tar`, you'll need: | ||
|
|
||
| * [clang-tidy] | ||
| * `md5sum` | ||
| * Python 3.8 or newer | ||
| * python3-venv | ||
| * [Task] | ||
|
|
||
| ### Setup | ||
|
|
||
| ```shell | ||
| ./tools/init.sh | ||
| ``` | ||
|
|
||
| ### Running the linters | ||
|
|
||
| Currently, `clang-tidy` has to be run manually: | ||
|
|
||
| ```shell | ||
| find src tests \ | ||
| -type f \ | ||
| \( -iname "*.cpp" -o -iname "*.hpp" \) \ | ||
| -print0 | \ | ||
| xargs -0 clang-tidy --config-file .clang-tidy -p build | ||
| ``` | ||
|
|
||
| To report all errors run: | ||
| To report all errors, run: | ||
|
|
||
| ```shell | ||
| task lint:check | ||
| ``` | ||
|
|
||
| To fix cpp errors, and report yaml errors, run: | ||
| To automatically fix any supported format or linting errors, run: | ||
|
|
||
| ```shell | ||
| task lint:fix | ||
|
|
@@ -217,9 +188,8 @@ The following are issues we're aware of and working on: | |
|
|
||
| [bug-report]: https://github.com/y-scope/log-surgeon/issues/new?assignees=&labels=bug&template=bug-report.yaml | ||
| [Catch2]: https://github.com/catchorg/Catch2/tree/devel | ||
| [clang-tidy]: https://clang.llvm.org/extra/clang-tidy/ | ||
| [feature-req]: https://github.com/y-scope/log-surgeon/issues/new?assignees=&labels=enhancement&template=feature-request.yaml | ||
| [fmt]: https://github.com/fmtlib/fmt | ||
| [GSL]: https://github.com/microsoft/GSL | ||
| [lint]: https://github.com/y-scope/log-surgeon/blob/main/.github/workflows/lint.yaml | ||
| [Task]: https://taskfile.dev/ | ||
| [uv]: https://docs.astral.sh/uv | ||
Uh oh!
There was an error while loading. Please reload this page.