[tool] tools/targets/vsc.py : improve compile_commands handling and w…#11138
[tool] tools/targets/vsc.py : improve compile_commands handling and w…#11138supperthomas merged 1 commit intoRT-Thread:masterfrom
Conversation
…orkspace excludes - broaden source file extension detection to include C++ and asm - resolve compile_commands path to absolute and pass its directory to clangd - limit excludes scan to rt-thread/packages and always include board/linker_scripts
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
| # os.chdir(root_path) | ||
| # 轮询root文件夹下面的每一个文件夹和子文件夹 | ||
| for root, dirs, files in os.walk(root_path): | ||
| if not is_under_roots(root, root_path, ('rt-thread', 'packages')): |
There was a problem hiding this comment.
只从编译后的 compile_commands.json 解析rt-thread, packages 这两个目录的没有参与编译的部分 然后作为工作区的文件排除
|
这个用起来咋样?顺手不? |
非常好用 及时没有这个导出为vsc 也可以开发 无非是搜索某些函数的时候有些没参与编译的文件 排除起来很麻烦 |
那个实在太多了,特别是bsp下面的其他soc |
拉取/合并请求描述:(PR description)
为什么提交这份PR (why to submit this PR)
围。
你的解决方案是什么 (what is your solution)
并确认并列出已经在什么情况或板卡上进行了测试。
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up