Skip to content

Commit 3c85f5f

Browse files
authored
Merge pull request #37 from sir-gon/develop
[CONFIG] [Github Actions] clang-format (code styling check) update to…
2 parents 4db9688 + 0d8a9ee commit 3c85f5f

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

.github/workflows/c-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ jobs:
2424
- name: Install
2525
shell: bash
2626
run: |
27-
export VCPKG_VERSION=2025.01.13
28-
brew install vcpkg
27+
export VCPKG_VERSION=2025.02.14
2928
git clone \
3029
--depth 1 \
3130
--branch $VCPKG_VERSION \
3231
https://github.com/microsoft/vcpkg.git \
3332
--single-branch \
3433
"$HOME/vcpkg"
3534
export VCPKG_ROOT="$HOME/vcpkg"
35+
echo "$VCPKG_ROOT" >> $GITHUB_PATH
3636
sh $VCPKG_ROOT/bootstrap-vcpkg.sh
3737
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV
3838

.github/workflows/clang-format.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
32
name: clang-format style check
43

54
on: # yamllint disable-line rule:truthy
@@ -25,7 +24,9 @@ jobs:
2524
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
2625
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
2726
sudo apt-get -y update
28-
sudo apt-get -y install --no-install-recommends --no-install-suggests clang-format
27+
sudo apt-get -y install --no-install-recommends --no-install-suggests clang-format-19
28+
sudo update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-19) 100
29+
sudo update-alternatives --set clang-format $(update-alternatives --list clang-format | grep clang-format-19)
2930
# yamllint enable rule:line-length
3031
3132
- name: Check Tools

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ ADD https://apt.llvm.org/llvm-snapshot.gpg.key llvm-snapshot.gpg.key
7272
RUN apt-key add llvm-snapshot.gpg.key && \
7373
apt-add-repository "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy main" && \
7474
apt-get -y update && \
75-
apt-get -y install --no-install-recommends --no-install-suggests clang-format && \
75+
apt-get -y install --no-install-recommends --no-install-suggests clang-format-19 && \
76+
update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-19) 100 && \
7677
rm -rf /var/lib/apt/lists/*
7778

7879
ADD https://deb.nodesource.com/setup_22.x nodesource_setup.sh

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ COVERAGE_TOOL_OPTS=--config-file .lcovrc --ignore-errors empty --ignore-errors i
2828

2929
# C++ specific
3030
SRC_DIR = src
31-
FILES := $(shell find $(SRC_DIR) -name '*.cpp' -o -name '*.h' -o -name '*.hpp' -o -name '*.inl')
31+
FILES := $(shell find $(SRC_DIR) -name '*.cpp' -o -name '*.c' -o -name '*.h' -o -name '*.hpp' -o -name '*.inl')
3232

3333
.MAIN: test
3434
.PHONY: all clean dependencies help list test outdated

src/lib/exercises/src/hackerrank/projecteuler/euler001.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ unsigned long HACKERRANK_PROJECTEULER_gcd(unsigned long a, unsigned long b) {
2828
}
2929

3030
// Function to find sum of Arithmetic Progression series
31-
unsigned long HACKERRANK_PROJECTEULER_sum_of_arithmetic_progression(unsigned long n, unsigned long d) {
31+
unsigned long
32+
HACKERRANK_PROJECTEULER_sum_of_arithmetic_progression(unsigned long n,
33+
unsigned long d) {
3234
// Number of terms
3335
n = n / d;
3436
return n * (1 + n) * d / 2;

0 commit comments

Comments
 (0)