Skip to content

Commit 84fc381

Browse files
committed
Add formatting check workflow
Add workflow to ensure proper formatting for all submissions. Signed-off-by: Winford <[email protected]>
1 parent a0e3351 commit 84fc381

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#
2+
# Copyright 2022 Davide Bettio <[email protected]>
3+
# Copyright 2025 Winford (Uncle Grumpy) <[email protected]>
4+
#
5+
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
6+
#
7+
8+
name: "Check Erlang Formatting"
9+
10+
on:
11+
push:
12+
paths:
13+
- 'src/**'
14+
- 'test/**'
15+
- '**/*.erl'
16+
pull_request:
17+
paths:
18+
- 'src/**'
19+
- 'test/**'
20+
- '**/*.erl'
21+
22+
jobs:
23+
format-check:
24+
runs-on: ubuntu-24.04
25+
container: erlang:27
26+
steps:
27+
- name: "Install deps"
28+
run: |
29+
apt install -y git
30+
31+
- name: "Install erlfmt"
32+
run: |
33+
cd ${HOME}
34+
git clone --depth 1 -b v1.6.0 https://github.com/WhatsApp/erlfmt.git
35+
cd erlfmt
36+
rebar3 as release escriptize
37+
38+
- uses: actions/checkout@v4
39+
40+
- name: "Check formatting with erlfmt"
41+
run: |
42+
find . -name *.erl | xargs ${HOME}/erlfmt/_build/release/bin/erlfmt -c

0 commit comments

Comments
 (0)