You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/10/21 17:04:44 UTC

[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #1025: Use clang-tidy instead of cppcheck

PragmaTwice commented on code in PR #1025:
URL: https://github.com/apache/incubator-kvrocks/pull/1025#discussion_r1002010830


##########
.github/workflows/kvrocks.yaml:
##########
@@ -65,10 +64,12 @@ jobs:
         if: always() && steps.check-format.outcome != 'success'
         with:
           path: clang-format.patch
-      - name: Lint and check code
+      - name: Lint gocase code
+        run: ./x.py check golangci-lint
+      - name: Check cpp code via clang-tidy
         run: |
-          ./x.py check cppcheck
-          ./x.py check golangci-lint
+          ./x.py build tidy-build --config-only
+          ./x.py check tidy tidy-build -j $(nproc) --clang-tidy-path clang-tidy-12 --run-clang-tidy-path run-clang-tidy-12

Review Comment:
   Yeah, clang-tidy need a full configuration, which means we should run cmake to generate all build informations.
   
   I think it is not a complex proceudure, since as a developer, we always build the project by our own, e.g.
   ```
   ./x.py build
   ```
   Then, if want to run clang-tidy, we can just run:
   ```
   ./x.py check tidy # the `build` dir can be omitted 
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org