# conformallab++ cmake-format policy
#
# Drives the cmake-format / cmake-lint tools used by
# scripts/quality/cmake-format.sh.  The defaults are deliberately
# permissive — the goal is to catch the obvious style drift (mixed
# 2-vs-4-space indent, inconsistent argument wrapping, undocumented
# options) without forcing a rewrite of every CMakeLists.txt we have.

format:
  line_width: 100               # match .clang-format
  tab_size: 4
  use_tabchars: false
  separate_ctrl_name_with_space: false
  separate_fn_name_with_space: false
  dangle_parens: false
  command_case: lower           # lowercase commands (cgal/upstream convention)
  keyword_case: upper           # KEYWORDS like PUBLIC/PRIVATE/INTERFACE in caps

lint:
  # Whitelist the disables we explicitly accept.
  disabled_codes:
    - C0103   # invalid variable name — we use CGAL_/conformallab_ prefixes
    - C0301   # line too long — handled by line_width, not as a lint error
    - C0111   # missing docstring on a function — most of ours are obvious

  # Maximum allowed nesting of conditional blocks.  3 is conservative;
  # raise if we ever genuinely need deeper.
  max_conditionals_custom_parser: 3
