Skip to content

Gecode 7: format the sources with LLVM 22 - #285

Draft
zayenz wants to merge 2 commits into
feature/breaking-7-01-build-baselinefrom
feature/breaking-7-02-reformat
Draft

zayenz wants to merge 2 commits into
feature/breaking-7-01-build-baselinefrom
feature/breaking-7-02-reformat

Conversation

@zayenz

@zayenz zayenz commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Before making wide source changes for Gecode 7, this PR puts formatting and lint tooling in place and runs the formatter once across the repository so later diffs stay readable.

There are two commits, and only the first needs review:

  • The first commit adds .clang-format (four-space indentation, 120-column limit, LLVM 22) and .clang-tidy, wires up the format, lint, and check commands in misc/check.py with their CMake targets, adds the CI format check, updates .editorconfig, and introduces docs/code-style.md. Generated variable headers follow the same formatting rules, and the qmake example projects become CMake projects.
  • The second commit is purely mechanical: it runs misc/check.py format on the owned sources, regenerates the FlatZinc parser, lexer, and variable headers, drops the per-file Emacs modelines (replaced by .editorconfig), and converts the single CRLF file to LF.

Once the reformat commit lands on main, its SHA there will be added to .git-blame-ignore-revs.

Stack

Merge in this order. #242 targets main, and each later PR builds on the one before it so its diff shows only its own commits. The first four PRs are standalone search and random-number changes; #284 through #274 are the Gecode 7 changes split out of what used to be a single branch.

  1. Rank solutions with Space::compare in best-solution search #242 Rank solutions with Space::compare
  2. Rename the meta-search hooks to hub and spoke #282 Rename the meta-search hooks to hub and spoke
  3. Give meta search hub and spoke contexts and report why search ended #283 Hub and spoke contexts and end reasons
  4. Add extensible random generators with reproducible stream splitting #241 Splittable random generators
  5. Gecode 7: CMake-only C++23 build baseline #284 Gecode 7: build baseline
  6. Gecode 7: format the sources with LLVM 22 #285 Gecode 7: reformat ← this PR
  7. Gecode 7: normalized API names, LT constants and Clang checks #286 Gecode 7: API names, LT constants, checks
  8. Gecode 7: post nothing for empty arrays #287 Gecode 7: empty arrays
  9. Gecode 7: pass large parameters by const reference #288 Gecode 7: const& parameters
  10. Gecode 7: state and assert the heap size contract #289 Gecode 7: heap contract
  11. Gecode 7: trivially copyable handles and defaulted special members #290 Gecode 7: modern classes
  12. Gecode 7: native float interval instead of Boost #291 Gecode 7: native float interval
  13. Gecode 7: bug fixes and Doxygen warnings #292 Gecode 7: bug fixes and Doxygen
  14. Gecode 7: scoped enums and descriptive constant names #293 Gecode 7: scoped enums
  15. Gecode 7: clang-tidy sweep #274 Gecode 7: clang-tidy sweep

Add .clang-format and .clang-tidy, the misc/check.py format, lint and
check commands with their CMake targets, the CI formatting check, and
the code style guide. Generated variable headers are formatted with the
same rules, and the qmake example projects become CMake projects.
This commit only runs misc/check.py format on the owned sources and
regenerates the parser, lexer and variable headers. It also removes the
Emacs modelines and converts the one CRLF file to LF.

This branch has not been deployed

No deployments
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.

1 participant