Skip to content

Commit e704414

Browse files
committed
fix(ci, formatting): update configuration for formatting checks, format Macros.ark
1 parent 3a604a8 commit e704414

File tree

6 files changed

+16
-14
lines changed

6 files changed

+16
-14
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v4
20+
- run: rm -rf tests
2021
- name: Format check
2122
uses: ArkScript-lang/action-format@master
2223
with:
2324
folder: .
24-
exclude: tests
2525

2626
build:
2727
runs-on: ubuntu-24.04

Lazy.ark

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
(mut _has_been_called false)
1313
(mut _memorized_value nil)
1414

15-
(fun (&f &_has_been_called &_memorized_value) {
15+
(fun (&f
16+
&_has_been_called
17+
&_memorized_value) {
1618
(if (not _has_been_called) {
1719
(set _has_been_called true)
1820
(set _memorized_value (f)) })

Macros.ark

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@
102102
# (print "this will always be executed"))
103103
# =end
104104
# @author https://github.com/SuperFola
105-
(macro unless (cond ...body)
106-
(if (not cond) ...body))
105+
(macro unless (cond ...body) (if (not cond) ...body))
107106

108107
# @brief Iterate until the condition is truthy
109108
# @param cond condition
@@ -116,5 +115,4 @@
116115
# (print data) # [0 1 2 3 4 5 6 7 8 9]
117116
# =end
118117
# @author https://github.com/SuperFola
119-
(macro until (cond body)
120-
(while (not cond) body))
118+
(macro until (cond body) (while (not cond) body))

Math.ark

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@
145145
# =end
146146
# @author https://github.com/SuperFola
147147
(let complex (fun (real imag)
148-
(fun (&real &imag) ())))
148+
(fun (&real
149+
&imag) ())))
149150

150151
# @brief Compute the addition of two complex number
151152
# @param _c0 the first complex number

Range.ark

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@
2828
(let reset (fun ()
2929
(set i _a)))
3030

31-
(fun (&i &_a &_b &asList &reset) {
31+
(fun (&i
32+
&_a
33+
&_b
34+
&asList
35+
&reset) {
3236
(if (< i _b) {
3337
(set i (+ i 1))
3438
(- i 1) }) }) }))

Testing.ark

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,12 @@
3131
(let update_case_ptr (fun (val)
3232
(set case_pointer val)))
3333

34-
(let need_case? (fun ()
35-
(and (not (empty? case_desc)) (!= case_pointer (len cases)))))
34+
(let need_case? (fun () (and (not (empty? case_desc)) (!= case_pointer (len cases)))))
3635

3736
(let set_active (fun (bool)
3837
(set active bool)))
3938

40-
(fun (
41-
&name
39+
(fun (&name
4240
&passed
4341
&failed
4442
&failures
@@ -55,8 +53,7 @@
5553
&update_case_ptr
5654
&need_case?
5755
&active
58-
&set_active)
59-
()) }))
56+
&set_active) ()) }))
6057

6158
# internal, do not use
6259
(mut _suite nil)

0 commit comments

Comments
 (0)