Closed mnijhuis-tos closed 4 years ago
I can see the point why you want to simplify this - for the specific dp3 case at least. Nevertheless I wonder whether we actually would like to do this, since:
run-clang-format.sh
script could be added to the pre-commit hook to do the reformatting when committing. In your implementation, you actually would do the format check if you add the script to the pre-commit hook. I wouldn't be in favor of that.*.h
and *.cc
files only, and deleted the option to exclude certain directories from being reformatted. That's probably ok for the DP3 repo, but the formatting scripts are intended to be re-used across multiple repositories, e.g. wsclean
(with *.h
and *.cpp
files) and everybeam
- with a couple of externals
that you definitely don't want to reformat.I can live with your edits regarding 2, but I wouldn't opt for your choices regarding 1, i.e. I am still in favor of splitting it up in a run
and a check
(of course, it's perfectly fine with me if you do the check
entirely in the CI/CD yml
file)
This change significantly reduces the formatting script size while still maintaining full functionality.