mirror of
https://github.com/transmission/transmission
synced 2025-03-03 18:25:35 +00:00
refactor, ci: switch clang-format to LLVM 15 (#4297)
Bump required clang-format version to 15
This commit is contained in:
parent
841419d067
commit
bf6c80ae35
4 changed files with 9 additions and 7 deletions
5
.github/workflows/actions.yml
vendored
5
.github/workflows/actions.yml
vendored
|
@ -84,7 +84,10 @@ jobs:
|
|||
submodules: recursive
|
||||
- name: Get Dependencies
|
||||
run: |
|
||||
sudo apt-get install clang-format-12 npm yarn
|
||||
set -ex
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main"
|
||||
sudo apt-get install -y clang-format-15 npm yarn
|
||||
- name: Check for style diffs
|
||||
id: check-for-diffs
|
||||
working-directory: .
|
||||
|
|
|
@ -40,10 +40,10 @@ find_cfiles() {
|
|||
! \( $(get_find_path_args $(trim_comments .clang-format-ignore)) \) "$@"
|
||||
}
|
||||
|
||||
# We're targeting clang-format version 12 and other versions give slightly
|
||||
# different results, so prefer `clang-format-12` if it's installed.
|
||||
# We're targeting clang-format version 15 and other versions give slightly
|
||||
# different results, so prefer `clang-format-15` if it's installed.
|
||||
clang_format_exe_names=(
|
||||
'clang-format-12'
|
||||
'clang-format-15'
|
||||
'clang-format'
|
||||
)
|
||||
for name in ${clang_format_exe_names[@]}; do
|
||||
|
|
|
@ -55,7 +55,7 @@ static void tr_variant_string_clear(struct tr_variant_string* str)
|
|||
{
|
||||
if (str->type == TR_STRING_TYPE_HEAP)
|
||||
{
|
||||
delete[]((char*)(str->str.str));
|
||||
delete[] ((char*)(str->str.str));
|
||||
}
|
||||
|
||||
*str = StringInit;
|
||||
|
|
|
@ -98,8 +98,7 @@
|
|||
|
||||
// Logical OR these values into the u_int that you pass in the -addPath:notifyingAbout: method
|
||||
// to specify the types of notifications you're interested in. Pass the default value to receive all of them.
|
||||
typedef NS_OPTIONS(u_int, VDKQueueNotify)
|
||||
{
|
||||
typedef NS_OPTIONS(u_int, VDKQueueNotify) {
|
||||
VDKQueueNotifyAboutRename = NOTE_RENAME, ///< Item was renamed.
|
||||
VDKQueueNotifyAboutWrite = NOTE_WRITE, ///< Item contents changed (also folder contents changed).
|
||||
VDKQueueNotifyAboutDelete = NOTE_DELETE, ///< Item was removed.
|
||||
|
|
Loading…
Reference in a new issue