conp-solutions / riss

Riss SAT Solver
GNU Lesser General Public License v2.1
8 stars 5 forks source link

Ci 2 #24

Open conp-solutions opened 2 years ago

AntonReinhard commented 2 years ago

Does astyle have any big advantages over clang-format? I already added clang-format in my branch and we could use a script like below to verify everything is formatted correctly. I also already formatted everything using my .clang-format file, so merging with another style now would probably be hell...

We could of course change the .clang-format I created if you like a different style.

#!/bin/bash
if [ 0 -ne $(find coprocessor pfolio proofcheck riss \( -iname "*.h" -o -iname "*.c" -o -iname "*.hpp" -o -iname "*.cpp" \) -exec clang-format -style=file -n {} \+ 2>&1 | grep -A 2 "Wclang-format-violations" | tee /tmp/formatting-errors.txt | wc -l) ]; then
  cat /tmp/formatting-errors.txt
  exit 1
fi
conp-solutions commented 2 years ago

I have no strong preference. We simply set riss up with astyle (around 7 years ago).

I'm find switching to clang-format. The template I use in other projects is:

https://github.com/conp-solutions/mergesat/blob/master/.clang-format

That project also has a script for checking:

https://github.com/conp-solutions/mergesat/blob/master/.github/workflows/check-style.yml