Commit Graph

5 Commits

Author SHA1 Message Date
Robert Adam
8500655d12 MAINT: Don't try to format files in build dirs
This speeds up the invocation of runClangFormat.sh dramatically.
2022-03-27 09:49:59 +02:00
Klemens Nanni
16c94a4dd0 CI: scripts/runClangFormat.sh: Use git-ls-files(1)
Current problems:
- bash(1) is not always installed (by default), /bin/sh is
- (Open)BSD find(1) requires at least one path argument, i.e. `.` which GNU
  find(1) implies
- (Open)BSD find(1) does not support `-ipath`

git-ls-files(1) benefits:
- gitignore(5) files are honored
- simpler/more powerful patterns (see gitglossary(7) wrt. `pathspec`)
- `runClangFormat.sh` can be run from git subdirectories to only format
  selected files (explicitl passing files could be easil implemented)
- works on every system with git(1), no portability issues (see above)

The one "drawback" with git-ls-files(1) is requiring git(1) working tree
rather than a release tarball, but active development requries git
anyway, so that does not seem like a blocker.

Only run xargs(1) if files were listed (`-r`), since we can now run the
script from subdirectories without source code.

Avoid brace expansion (`'**/*'.{cpp,c,hpp,h,cxx,cc}`) to be compatible
with dash.
2022-01-25 11:19:19 +03:00
Robert Adam
d100ff1467 MAINT: Update copyright to 2022 2022-01-04 20:17:33 +01:00
Robert Adam
59ae429972 MAINT: Update copyright notice to 2021
This was done by running scripts/updateLicenseHeaders.py and then
manually editing the LICENSE file.
2021-03-02 10:15:01 +01:00
Robert Adam
459a3bf888 MAINT: Added clang-format support
The used .clang-format file has been generated using clang-format 6
(shipped with Ubuntu 18.04) and is therefore backwards compatible with
all clang-format versions until v6.
2020-09-11 18:28:38 +02:00