-
Notifications
You must be signed in to change notification settings - Fork 8
refactor: Update to the latest version of yscope-dev-utils: #63
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 9 commits
55d0113
0f092ec
beabd86
d45ab6a
ebc90c0
7899475
10c3ead
8c1ecd8
889fef8
c5364ac
4c0cefa
148bb2d
f149b2d
cfad49e
aff82e7
35e1aa8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,5 @@ | ||
| # Lock to v19.x until we can upgrade our code to fix new v20 issues. | ||
| clang-format~=19.1 | ||
| # Lock to v19.x until we can upgrade our code to fix new v20 issues. | ||
| clang-tidy~=19.1 | ||
| clang-format>=20.1.0 | ||
| clang-tidy>=19.1.0 | ||
| colorama>=0.4.6 | ||
| gersemi>=0.16.2 | ||
| yamllint>=1.35.1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,12 +58,12 @@ tasks: | |
| internal: true | ||
| run: "once" | ||
| cmds: | ||
| - task: ":utils:cmake-install-remote-tar" | ||
| - task: ":utils:cmake:install-remote-tar" | ||
| vars: | ||
| NAME: "{{.G_CATCH2_LIB_NAME}}" | ||
| CMAKE_PACKAGE_NAME: "{{.G_CATCH2_LIB_NAME}}" | ||
| WORK_DIR: "{{.G_CATCH2_WORK_DIR}}" | ||
| FILE_SHA256: "1ab2de20460d4641553addfdfe6acd4109d871d5531f8f519a52ea4926303087" | ||
| URL: "https://github.com/catchorg/Catch2/archive/refs/tags/v3.8.0.tar.gz" | ||
| TAR_SHA256: "1ab2de20460d4641553addfdfe6acd4109d871d5531f8f519a52ea4926303087" | ||
| TAR_URL: "https://github.com/catchorg/Catch2/archive/refs/tags/v3.8.0.tar.gz" | ||
| - task: "add-package-root-to-cmake-settings" | ||
| vars: | ||
| NAME: "{{.G_CATCH2_LIB_NAME}}" | ||
|
|
@@ -75,13 +75,13 @@ tasks: | |
| deps: | ||
| - "install-quickcpplib" | ||
| cmds: | ||
| - task: ":utils:cmake-install-remote-tar" | ||
| - task: ":utils:cmake:install-remote-tar" | ||
| vars: | ||
| NAME: "{{.G_OUTCOME_LIB_NAME}}" | ||
| CMAKE_PACKAGE_NAME: "{{.G_OUTCOME_LIB_NAME}}" | ||
| WORK_DIR: "{{.G_OUTCOME_WORK_DIR}}" | ||
| FILE_SHA256: "0382248cbb00806ce4b5f3ce6939797dc3b597c85fd3531614959e31ef488b39" | ||
| URL: "https://github.com/ned14/outcome/archive/refs/tags/v2.2.11.tar.gz" | ||
| GEN_ARGS: | ||
| TAR_SHA256: "0382248cbb00806ce4b5f3ce6939797dc3b597c85fd3531614959e31ef488b39" | ||
| TAR_URL: "https://github.com/ned14/outcome/archive/refs/tags/v2.2.11.tar.gz" | ||
| CMAKE_GEN_ARGS: | ||
| - "-C {{.G_DEPS_CMAKE_SETTINGS_DIR}}/{{.G_QUICKCPPLIB_LIB_NAME}}.cmake" | ||
| - "-DBUILD_TESTING=OFF" | ||
| - "-DCMAKE_BUILD_TYPE=Release" | ||
|
|
@@ -95,13 +95,13 @@ tasks: | |
| internal: true | ||
| run: "once" | ||
| cmds: | ||
| - task: ":utils:cmake-install-remote-tar" | ||
| - task: ":utils:cmake:install-remote-tar" | ||
| vars: | ||
| NAME: "{{.G_QUICKCPPLIB_LIB_NAME}}" | ||
| CMAKE_PACKAGE_NAME: "{{.G_QUICKCPPLIB_LIB_NAME}}" | ||
| WORK_DIR: "{{.G_QUICKCPPLIB_WORK_DIR}}" | ||
| FILE_SHA256: "5d4c9b2d6fa177d3fb14f3fe3086867e43b44f4a7a944eb10ee4616b2b0f3c05" | ||
| URL: "https://github.com/ned14/quickcpplib/archive/f3e452e.tar.gz" | ||
| GEN_ARGS: | ||
| TAR_SHA256: "5d4c9b2d6fa177d3fb14f3fe3086867e43b44f4a7a944eb10ee4616b2b0f3c05" | ||
| TAR_URL: "https://github.com/ned14/quickcpplib/archive/f3e452e.tar.gz" | ||
| CMAKE_GEN_ARGS: | ||
| - "-DBUILD_TESTING=OFF" | ||
| - "-DCMAKE_BUILD_TYPE=Release" | ||
|
Member
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. Can we alphabetize these variables? |
||
| - task: "add-package-root-to-cmake-settings" | ||
|
Member
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. Instead of using |
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -17,20 +17,18 @@ tasks: | |||||||||||||||||||||||||||||||||||||||||||||||||||
| desc: "Runs the C++ linters that identify formatting issues." | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| sources: &cpp_format_src_files | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.G_LINT_VENV_CHECKSUM_FILE}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.G_CPP_SRC_DIR}}/**/*.cpp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.G_CPP_SRC_DIR}}/**/*.h" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.G_CPP_SRC_DIR}}/**/*.hpp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.G_CPP_SRC_DIR}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
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. Let's undo this change since
Contributor
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. Yea true. I was doing so but finally I thought we might want to also check other files under other dirs and clang-tidy will help to filter files by extension automatically lol. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.ROOT_DIR}}/.clang-format" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.TASKFILE}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| deps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "cpp-configs" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "venv" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| cmds: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - task: ":utils:clang-format" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - task: ":utils:cpp-lint:clang-format" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| vars: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| FLAGS: "--dry-run" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| SRC_PATHS: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ref: ".G_LINT_CPP_DIRS" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| FLAGS: ["--dry-run"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
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.
Suggested change
There are no |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ROOT_PATHS: *cpp_format_src_files | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
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.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| VENV_DIR: "{{.G_LINT_VENV_DIR}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| cpp-format-fix: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -40,11 +38,11 @@ tasks: | |||||||||||||||||||||||||||||||||||||||||||||||||||
| - "cpp-configs" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "venv" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| cmds: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - task: ":utils:clang-format" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - task: ":utils:cpp-lint:clang-format" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| vars: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| FLAGS: "-i" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| SRC_PATHS: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ref: ".G_LINT_CPP_DIRS" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| FLAGS: ["-i"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| INCLUDE_FILENAME_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ROOT_PATHS: *cpp_format_src_files | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
Member
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.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| VENV_DIR: "{{.G_LINT_VENV_DIR}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| cpp-static-check: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -55,38 +53,37 @@ tasks: | |||||||||||||||||||||||||||||||||||||||||||||||||||
| aliases: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "cpp-static-fix" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| desc: "Runs the C++ static analyzers. Only checks for warnings and violations." | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| sources: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| sources: &cpp_static_src_files | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.G_CMAKE_CACHE}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.G_COMPILE_COMMANDS_DB}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.G_LINT_VENV_CHECKSUM_FILE}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.G_CPP_SRC_DIR}}/**/*.cpp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.G_CPP_SRC_DIR}}/**/*.h" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.G_CPP_SRC_DIR}}/**/*.hpp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.G_CPP_SRC_DIR}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.ROOT_DIR}}/.clang-tidy" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.TASKFILE}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
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.
Member
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. I meant get rid of the |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| deps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - ":build:init" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "cpp-configs" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "venv" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| cmds: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - task: ":utils:clang-tidy" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - task: ":utils:cpp-lint:clang-tidy-find" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| vars: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| FLAGS: >- | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| --config-file "{{.ROOT_DIR}}/.clang-tidy" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| -p "{{.G_COMPILE_COMMANDS_DB}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| SRC_PATHS: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ref: ".G_LINT_CPP_DIRS" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| FLAGS: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "--config-file '{{.ROOT_DIR}}/.clang-tidy'" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "-p '{{.G_COMPILE_COMMANDS_DB}}'" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| INCLUDE_PATTERNS: ["*.cpp", "*.h", "*.hpp", "*.inc"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
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.
Suggested change
Contributor
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. I feel we should change this line to
Member
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. Sure, but that's already the default in |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| OUTPUT_DIR: "{{.G_LINT_CLANG_TIDY_DIR}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
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.
vars:
G_LINT_CLANG_TIDY_DIR: "{{.G_BUILD_DIR}}/lint-clang-tidy"
Contributor
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. I am going to remove it because we didn't use it before (also there is no output dir for
Member
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. If you read the docstring for clang-tidy-find, you'll see that it will default to putting it at the root of the repository. That's going to mess up developers' local copy unnecessarily, right? |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| ROOT_PATHS: *cpp_static_src_files | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
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.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| VENV_DIR: "{{.G_LINT_VENV_DIR}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+75
to
73
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. 💡 Verification agent 🧩 Analysis chainValidate and refine clang-tidy flag syntax FLAGS:
- - "--config-file '{{.ROOT_DIR}}/.clang-tidy'"
- - "-p '{{.G_COMPILE_COMMANDS_DB}}'"
+ - "--config-file"
+ - "{{.ROOT_DIR}}/.clang-tidy"
+ - "-p"
+ - "{{.G_COMPILE_COMMANDS_DB}}"Let’s inspect how other tasks define 🏁 Script executed: #!/bin/bash
rg -n "FLAGS:" -A3 taskfilesLength of output: 1461 Separate clang-tidy flags and their arguments • Location: FLAGS:
- - "--config-file '{{.ROOT_DIR}}/.clang-tidy'"
- - "-p '{{.G_COMPILE_COMMANDS_DB}}'"
+ - "--config-file"
+ - "{{.ROOT_DIR}}/.clang-tidy"
+ - "-p"
+ - "{{.G_COMPILE_COMMANDS_DB}}"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Contributor
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. I think it is not clear to separate the flag and value in different lines unless the values or flag is too long 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. @anlowee, I understand your preference for keeping flags and their values together for better readability. You're right that combining them in single strings like ✏️ Learnings added
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| cpp-configs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| internal: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| sources: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.ROOT_DIR}}/tools/yscope-dev-utils/lint-configs/.clang-format" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.ROOT_DIR}}/tools/yscope-dev-utils/lint-configs/.clang-tidy" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.ROOT_DIR}}/tools/yscope-dev-utils/exports/lint-configs/.clang-format" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.ROOT_DIR}}/tools/yscope-dev-utils/exports/lint-configs/.clang-tidy" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.TASKFILE}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| generates: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.ROOT_DIR}}/.clang-format" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "{{.ROOT_DIR}}/.clang-tidy" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| dir: "{{.ROOT_DIR}}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| cmds: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "tools/yscope-dev-utils/lint-configs/symlink-cpp-lint-configs.sh" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "tools/yscope-dev-utils/exports/lint-configs/symlink-cpp-lint-configs.sh" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we alphabetize these variables?