File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ parse :
2+ additional_commands : {}
3+
14format :
5+ disable : false
26 line_width : 80
37 tab_size : 4
48 use_tabchars : false
9+ fraction_only_last_hole : false
510
6- # Command formatting
7- command_case : lower
8- disable_paren_padding : true
9-
10- # Indentation
11- continuation_indent_width : 4
12- dangle_parens : false
11+ # Command naming rules
12+ command_case : " lower"
13+ keyword_case : " unchanged"
1314
14- # Lists / wrapping
15- max_sublist_length : 3
16- tight_list_bracket : true
15+ # Keep spacing tight on syntax commands like if(...)
16+ separate_ctrl_name_with_space : false
17+ separate_fn_name_with_space : false
1718
18- # Comments
19- comment_follows_code : false
20- comment_indent : 0
19+ # Handle multi-line blocks nicely (like your target_sources and install blocks)
20+ dangle_parens : true
21+ dangle_just : " always"
22+ require_valid_layout : true
23+
24+ max_lines_hwrap : 2
25+ max_rows_cmdline : 2
26+ max_subgroups_hwrap : 2
27+ max_pargs_hwrap : 4
28+ multiline_max_lines : 5
29+ smart_piping : true
2130
22- # Blank lines
23- max_empty_lines : 2
31+ layout :
32+ bullet_char : " *"
33+ enum_char : " ."
34+ line_break : " unix"
2435
25- # Misc
26- split_before_named_args : false
27- split_before_variadic_args : false
28- split_before_bracket : false
36+ markup :
37+ enable_markup : true
38+ first_comment_is_literal : true
39+ literal_comment_pattern : " ^#"
40+ # Protects your comment section banners (e.g., # =====...) from breaking
41+ fence_pattern : " ^\\ s*([`~]{3,}|[\\ -#=]{3,})\\ s*$"
42+ ruler_pattern : " ^\\ s*[\\ -#=]{3,}\\ s*$"
Original file line number Diff line number Diff line change 2121
2222 # clang-format
2323 - name : Run clang-format check
24+ continue-on-error : true
2425 uses : jidicula/clang-format-action@v4.16.0
2526 with :
2627 clang-format-version : " 22"
@@ -33,10 +34,25 @@ jobs:
3334 with :
3435 python-version : ' 3.x'
3536
36- - name : Install gersemi
37+ - name : Install cmakelang
3738 run : |
3839 python -m pip install --upgrade pip
39- pip install gersemi colorama
40+ pip install "cmakelang[YAML]"
4041
4142 - name : Run cmake-format check
42- run : find . -name "CMakeLists.txt" -o -name "*.cmake" | xargs gersemi --check --diff --color
43+ continue-on-error : true
44+ run : |
45+ # Find all CMake files
46+ CMAKE_FILES=$(find . -name "CMakeLists.txt" -o -name "*.cmake")
47+
48+ for file in $CMAKE_FILES; do
49+ # Check if the file requires formatting changes silently
50+ if ! cmake-format --config .cmake-format.yaml --check "$file" > /dev/null 2>&1; then
51+ echo "========================================================================"
52+ echo "❌ Formatting issues found in: $file"
53+ echo "========================================================================"
54+ # Print the unified diff for this file
55+ diff -u "$file" <(cmake-format --config .cmake-format.yaml "$file") || true
56+ echo ""
57+ fi
58+ done
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ if(PROJECT_IS_TOP_LEVEL)
1616 option (BUILD_EXAMPLE "Build the examples" ON )
1717 option (ENABLE_INSTALL "Enable installing the library" ON )
1818else ()
19- option (EGGS_FLAT_MAP_BUILD_EXAMPLE "Build the examples" OFF )
20- option (EGGS_FLAT_MAP_BUILD_TESTING "Build the testing tree" OFF )
19+ option (EGGS_FLAT_MAP_BUILD_EXAMPLE "Build the examples" OFF )
20+ option (EGGS_FLAT_MAP_BUILD_TESTING "Build the testing tree" OFF )
2121 option (EGGS_FLAT_MAP_ENABLE_INSTALL "Enable installing the library" OFF )
2222
2323 set (BUILD_EXAMPLE ${EGGS_FLAT_MAP_BUILD_EXAMPLE} )
You can’t perform that action at this time.
0 commit comments