Skip to content
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

Add cmake scripts for cpplint and clang-format #3440

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

ivikhrev
Copy link

@ivikhrev ivikhrev commented Apr 1, 2022

Based on openvino scripts (https://github.com/openvinotoolkit/openvino/tree/master/cmake/developer_package/clang_format and https://github.com/openvinotoolkit/openvino/tree/master/cmake/developer_package/cpplint).

Now each buildable target has 3 connected targets: <target_name>_cpplint, <target_name>_clang, <target_name>_clang_fix.
By default enabled only clang-format checks. When build target with cmake --build will be triggered corresponding clang_fix task which automatically apply code style changes. To run only clang-format checks for all targets pass to the cmake --build . --target <target_name> clang_format_check_all or clang_format_fix_all to apply code style fixes.
To start cpplint checks you should pass to cmake parameter -DENABLE_CPPLINT=ON and then build<target_name>_cpplintfor individual targets or cpplint_all to check all targets.

@ivikhrev ivikhrev requested a review from Wovchena April 1, 2022 16:26
@ivikhrev ivikhrev force-pushed the add-style-checkers branch 2 times, most recently from f88a479 to b358c6e Compare April 4, 2022 09:08
@vladimir-dudnik
Copy link
Contributor

pre-commit check failed
12:11:40 running documentation checks...
12:11:44 cmake/cpplint/cpplint.py: has a shebang line, but isn't executable
12:11:44 cmake/cpplint/cpplint.py:1: use 'python3', not 'python'

@ivikhrev ivikhrev force-pushed the add-style-checkers branch 2 times, most recently from 3e191e4 to 05266c9 Compare April 4, 2022 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants