admin管理员组文章数量:1403343
I'm using Trunk in VS Code to run clang-tidy
as a linter for my C++ project. When I run:
trunk check
I can see clang-tidy
running in the output, and it does find issues:
...
...
...
10:2 medium Call to virtual method 'UdpLayer::parseHeader' during construction bypasses virtual clang-tidy/clang-analyzer-optin.cplusplus.VirtualCall
dispatch
70:24 medium do not use pointer arithmetic clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic
70:48 medium do not use pointer arithmetic clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic
71:29 medium do not use pointer arithmetic clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic
71:53 medium do not use pointer arithmetic clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic
77:20 medium do not use pointer arithmetic clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic
77:44 medium do not use pointer arithmetic clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic
78:22 medium do not use pointer arithmetic clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic
78:46 medium do not use pointer arithmetic clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic
91:5 medium missing username/bug in TODO clang-tidy/google-readability-todo
96:5 medium missing username/bug in TODO clang-tidy/google-readability-todo
Checked 25 files
✖ 23 unformatted files
✖ 191 lint issues (98 auto-fixable)
However, these issues do not appear in the Trunk sidebar in VS Code:
Trunk sidebar in vscode showing only clang-format's insights but not clang-tidy's
These are the things I tried:
Confirmed that
clang-tidy
is enabled in.trunk/trunk.yaml
:lint:
enabled:
- [email protected]
Made sure I have a
.clang-tidy
config file in the project root.Generated
compile_commands.json
file usingbear
.Verified that
clang-tidy
issues appear when runningtrunk check
in the terminal.Restarted VS Code and reloaded the Trunk extension.
本文标签: cClangTidy in Trunk Runs but Doesn39t Show Issues in VS Code SidebarStack Overflow
版权声明:本文标题:c++ - Clang-Tidy in Trunk Runs but Doesn't Show Issues in VS Code Sidebar - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744411028a2604951.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论