Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update clang format to version 16 #927

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/check-formatting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ jobs:
- name: "Install run-clang-format"
run: |
wget -q -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main" | sudo tee -a /etc/apt/sources.list
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y clang-format-13
sudo apt-get install -y clang-format-16
curl -sSfL https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py -o run-clang-format
chmod +x run-clang-format

- name: "Check formatting with clang-format"
run: |
./run-clang-format --style=file --clang-format-executable=clang-format-13 -r src/ tests/
./run-clang-format --style=file --clang-format-executable=clang-format-16 -r src/ tests/

- name: "Check formatting with Erlang fmt"
if: success() || failure()
Expand Down
2 changes: 1 addition & 1 deletion src/libAtomVM/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "tempstack.h"
#include "term.h"

//#define ENABLE_TRACE
// #define ENABLE_TRACE

#include "trace.h"
#include "utils.h"
Expand Down
2 changes: 1 addition & 1 deletion src/libAtomVM/refc_binary.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "tempstack.h"
#include "utils.h"

//#define ENABLE_TRACE
// #define ENABLE_TRACE

#include "trace.h"

Expand Down
2 changes: 1 addition & 1 deletion src/platforms/emscripten/src/lib/platform_nifs.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#include <math.h>

//#define ENABLE_TRACE
// #define ENABLE_TRACE
#include <trace.h>

#include "emscripten_sys.h"
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/rp2040/src/lib/platform_nifs.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#include "gpiodriver.h"

//#define ENABLE_TRACE
// #define ENABLE_TRACE
#include "trace.h"

#define VALIDATE_VALUE(value, verify_function) \
Expand Down
8 changes: 4 additions & 4 deletions tests/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ struct Test
// Favor modules that return 0
#define TEST_CASE(module) \
{ \
#module, 0, false, false \
#module, 0, false, false \
}
#define TEST_CASE_EXPECTED(module, expected) \
{ \
#module, expected, false, false \
#module, expected, false, false \
}
#define TEST_CASE_ATOMVM_ONLY(module, expected) \
{ \
#module, expected, false, true \
#module, expected, false, true \
}
#define TEST_CASE_COND(module, expected, skip) \
{ \
#module, expected, skip, false \
#module, expected, skip, false \
}

#ifndef AVM_NO_SMP
Expand Down
Loading