Explicitly set clang-format version to 16

This commit is contained in:
ragusaa 2024-04-03 16:35:23 -04:00 committed by Micah Snyder
parent e4d8f5155e
commit ee589c9517
No known key found for this signature in database
GPG key ID: 3449E631914956D0
2 changed files with 49 additions and 49 deletions

View file

@ -60,6 +60,6 @@ jobs:
- name: Run clang-format style check for C/C++ programs. - name: Run clang-format style check for C/C++ programs.
uses: jidicula/clang-format-action@v4.13.0 uses: jidicula/clang-format-action@v4.13.0
with: with:
clang-format-version: "14" clang-format-version: "16"
check-path: ${{ matrix.path['check'] }} check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }} exclude-regex: ${{ matrix.path['exclude'] }}

View file

@ -1,54 +1,54 @@
#!/bin/bash #!/bin/bash
clang-format -style='{ Language: Cpp, UseTab: Never, IndentWidth: 4, AlignTrailingComments: true, AlignConsecutiveAssignments: true, AlignAfterOpenBracket: true, AlignEscapedNewlines: Left, AlignOperands: true, AllowShortFunctionsOnASingleLine: Empty, AllowShortIfStatementsOnASingleLine: true, AllowShortLoopsOnASingleLine: true, BreakBeforeBraces: Linux, BreakBeforeTernaryOperators: true, ColumnLimit: 0, FixNamespaceComments: true, SortIncludes: false, MaxEmptyLinesToKeep: 1, SpaceBeforeParens: ControlStatements, IndentCaseLabels: true, DerivePointerAlignment: true }' -dump-config > .clang-format clang-format-16 -style='{ Language: Cpp, UseTab: Never, IndentWidth: 4, AlignTrailingComments: true, AlignConsecutiveAssignments: true, AlignAfterOpenBracket: true, AlignEscapedNewlines: Left, AlignOperands: true, AllowShortFunctionsOnASingleLine: Empty, AllowShortIfStatementsOnASingleLine: true, AllowShortLoopsOnASingleLine: true, BreakBeforeBraces: Linux, BreakBeforeTernaryOperators: true, ColumnLimit: 0, FixNamespaceComments: true, SortIncludes: false, MaxEmptyLinesToKeep: 1, SpaceBeforeParens: ControlStatements, IndentCaseLabels: true, DerivePointerAlignment: true }' -dump-config > .clang-format
clang-format -i -verbose clamav-milter/*.c clang-format-16 -i -verbose clamav-milter/*.c
clang-format -i -verbose clamav-milter/*.h clang-format-16 -i -verbose clamav-milter/*.h
clang-format -i -verbose clambc/*.c clang-format-16 -i -verbose clambc/*.c
clang-format -i -verbose clambc/*.h clang-format-16 -i -verbose clambc/*.h
clang-format -i -verbose clamconf/*.c clang-format-16 -i -verbose clamconf/*.c
clang-format -i -verbose clamconf/*.h clang-format-16 -i -verbose clamconf/*.h
clang-format -i -verbose clamd/*.c clang-format-16 -i -verbose clamd/*.c
clang-format -i -verbose clamd/*.h clang-format-16 -i -verbose clamd/*.h
clang-format -i -verbose clamdscan/*.c clang-format-16 -i -verbose clamdscan/*.c
clang-format -i -verbose clamdscan/*.h clang-format-16 -i -verbose clamdscan/*.h
clang-format -i -verbose clamdtop/*.c clang-format-16 -i -verbose clamdtop/*.c
clang-format -i -verbose clamdtop/*.h clang-format-16 -i -verbose clamdtop/*.h
clang-format -i -verbose clamscan/*.c clang-format-16 -i -verbose clamscan/*.c
clang-format -i -verbose clamscan/*.h clang-format-16 -i -verbose clamscan/*.h
clang-format -i -verbose clamsubmit/*.c clang-format-16 -i -verbose clamsubmit/*.c
clang-format -i -verbose clamsubmit/*.h clang-format-16 -i -verbose clamsubmit/*.h
clang-format -i -verbose examples/*.c clang-format-16 -i -verbose examples/*.c
clang-format -i -verbose examples/*.h clang-format-16 -i -verbose examples/*.h
clang-format -i -verbose examples/fileprop_analysis/*.c clang-format-16 -i -verbose examples/fileprop_analysis/*.c
clang-format -i -verbose examples/fileprop_analysis/old/*.c clang-format-16 -i -verbose examples/fileprop_analysis/old/*.c
clang-format -i -verbose freshclam/*.c clang-format-16 -i -verbose freshclam/*.c
clang-format -i -verbose freshclam/*.h clang-format-16 -i -verbose freshclam/*.h
clang-format -i -verbose libclamav/*.c clang-format-16 -i -verbose libclamav/*.c
clang-format -i -verbose libclamav/*.h clang-format-16 -i -verbose libclamav/*.h
clang-format -i -verbose libclamav/jsparse/*.c clang-format-16 -i -verbose libclamav/jsparse/*.c
clang-format -i -verbose libclamav/jsparse/*.h clang-format-16 -i -verbose libclamav/jsparse/*.h
clang-format -i -verbose libclamav/lzw/*.c clang-format-16 -i -verbose libclamav/lzw/*.c
clang-format -i -verbose libclamav/lzw/*.h clang-format-16 -i -verbose libclamav/lzw/*.h
clang-format -i -verbose libclamav/nsis/nulsft.* clang-format-16 -i -verbose libclamav/nsis/nulsft.*
clang-format -i -verbose libclamav/c++/*.cpp clang-format-16 -i -verbose libclamav/c++/*.cpp
clang-format -i -verbose libclamav/c++/*.h clang-format-16 -i -verbose libclamav/c++/*.h
clang-format -i -verbose libclamunrar_iface/*.cpp clang-format-16 -i -verbose libclamunrar_iface/*.cpp
clang-format -i -verbose libclamunrar_iface/*.h clang-format-16 -i -verbose libclamunrar_iface/*.h
clang-format -i -verbose libfreshclam/*.c clang-format-16 -i -verbose libfreshclam/*.c
clang-format -i -verbose libfreshclam/*.h clang-format-16 -i -verbose libfreshclam/*.h
clang-format -i -verbose common/*.c clang-format-16 -i -verbose common/*.c
clang-format -i -verbose common/*.h clang-format-16 -i -verbose common/*.h
clang-format -i -verbose sigtool/*.c clang-format-16 -i -verbose sigtool/*.c
clang-format -i -verbose sigtool/*.h clang-format-16 -i -verbose sigtool/*.h
clang-format -i -verbose clamonacc/*.c clang-format-16 -i -verbose clamonacc/*.c
clang-format -i -verbose clamonacc/*.h clang-format-16 -i -verbose clamonacc/*.h
clang-format -i -verbose clamonacc/*/*.c clang-format-16 -i -verbose clamonacc/*/*.c
clang-format -i -verbose clamonacc/*/*.h clang-format-16 -i -verbose clamonacc/*/*.h
clang-format -i -verbose unit_tests/*.c clang-format-16 -i -verbose unit_tests/*.c
clang-format -i -verbose unit_tests/*.h clang-format-16 -i -verbose unit_tests/*.h
clang-format -i -verbose win32/compat/*.c clang-format-16 -i -verbose win32/compat/*.c
clang-format -i -verbose win32/compat/*.h clang-format-16 -i -verbose win32/compat/*.h
# Undo changes to specific files that we don't really want to reformat # Undo changes to specific files that we don't really want to reformat
git checkout libclamav/iana_cctld.h git checkout libclamav/iana_cctld.h