Skip to content

Commit

Permalink
Cleanup codestyle.cmake
Browse files Browse the repository at this point in the history
* Use cmake_parse_arguments instead of a custom parser
* Fix suffix regular expressions to pick up some files we were missing
* Add EXCLUDES to the format_and_lint command
* Make separate rules for each format or lint command
* Add rules for chkfmt to check format without changing it
* Add js-beautifier format commands
* Enable clang-tidy lint commands
* Fix lint manifest relative path logic
  • Loading branch information
cheshirekow committed Feb 6, 2020
1 parent 20b5943 commit 06b2581
Show file tree
Hide file tree
Showing 9 changed files with 292 additions and 140 deletions.
10 changes: 10 additions & 0 deletions .cmake-format.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,15 @@
"kwargs": {
"PKG": "*"
}
},
"format_and_lint": {
"kwargs": {
"CC": "*",
"CCDEPENDS": "*",
"CMAKE": "*",
"PY": "*",
"JS": "*",
"EXCLUDE": "*"
}
}
}
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ set(CXX_STANDARD
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=${CXX_STANDARD}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")

add_custom_target(chkfmt)
add_custom_target(doc)
add_custom_target(format)
add_custom_target(gen)
Expand Down Expand Up @@ -126,4 +127,7 @@ add_custom_target(
)

add_custom_target(pre-push)
add_dependencies(pre-push better-test doc format gen lint)
add_dependencies(pre-push lint chkfmt)

add_custom_target(pre-release)
add_dependencies(pre-release better-test doc lint chkfmt)
Loading

0 comments on commit 06b2581

Please sign in to comment.