[CodeStyle] Use PFCCLab forked cmake-lint hook #59072
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Others
Description
我们现在使用的 https://github.com/cmake-lint/cmake-lint 已经是一个 fork 后继续维护的项目了,但是新的维护者已经 9 个月没有任何更新且不响应任何 issue、PR,最近发布的 Python 3.12 已经无法运行 cmake-lint( cmake-lint/cmake-lint#25 ),提了个 PR 也无人响应
另外我们现在的 CodeStyle(Python 3.10,与上述的 3.12 问题无关)流水线经常在 build cmake-lint 时候挂(近一两个月出现的),最近频率越来越高了(今天一天看到了三个,其中有一个是我的 PR,这就忍不了了)
比如 https://xly.bce.baidu.com/paddlepaddle/paddle/newipipe/detail/9540260/job/24455968
根据报错可以得知是直接 PEP 517 build 时候挂了,原来的 cmake-lint 离谱地在
setup_requires里写了个"pytest-runner",setup 时候依赖这个也不知道是为啥……https://github.com/cmake-lint/cmake-lint/blob/5f6c59c5b3d6224542327db4e55289117d32c636/setup.py#L40-L42
所以直接 fork 了个到 PFCCLab( https://github.com/PFCCLab/cmake-lint-paddle ),重写安装相关的,现在 3.7-3.12 都是有 CI 监测的
当然,以后如果有更优秀的 fork 或者更优秀的 CMake 相关 Linter 可以考虑切换
PCard-66972