Skip to content

Commit 4a60118

Browse files
authored
Runic formatter (#6)
1 parent 1191032 commit 4a60118

6 files changed

Lines changed: 158 additions & 151 deletions

File tree

.github/workflows/format.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
name: Format
1+
name: Runic formatting
22
on:
33
push:
4-
branches: [master]
5-
tags: [v*]
4+
branches:
5+
- 'master'
6+
- 'release-'
7+
tags:
8+
- '*'
69
pull_request:
7-
810
jobs:
9-
format:
10-
name: "Format Check"
11+
runic:
12+
name: Runic
1113
runs-on: ubuntu-latest
1214
steps:
13-
- uses: actions/checkout@v4
14-
- uses: julia-actions/setup-julia@v2
15+
- uses: actions/checkout@v5
16+
# - uses: julia-actions/setup-julia@v2
17+
# with:
18+
# version: '1'
19+
# - uses: julia-actions/cache@v2
20+
- uses: fredrikekre/runic-action@v1
1521
with:
16-
version: 1
17-
- uses: julia-actions/cache@v2
18-
- name: Install JuliaFormatter and format
19-
run: |
20-
using Pkg
21-
Pkg.add(PackageSpec(name="JuliaFormatter", version="1"))
22-
using JuliaFormatter
23-
format("."; verbose=true)
24-
shell: julia --color=yes {0}
25-
- name: Suggest formatting changes
26-
uses: reviewdog/action-suggester@v1
22+
version: '1'
23+
format_files: true
24+
# Fail on next step instead
25+
continue-on-error: ${{ github.event_name == 'pull_request' }}
26+
- uses: reviewdog/action-suggester@v1
2727
if: github.event_name == 'pull_request'
2828
with:
29-
tool_name: JuliaFormatter
30-
fail_on_error: true
29+
tool_name: Runic
30+
fail_level: warning

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repos:
2+
- repo: https://github.com/fredrikekre/runic-pre-commit
3+
rev: v2.0.1
4+
hooks:
5+
- id: runic

docs/make.jl

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33
#
44

55
if "--help" ARGS
6-
println("""
7-
docs/make.jl
6+
println(
7+
"""
8+
docs/make.jl
89
9-
Render the `AlgorithmsInterface.jl` documentation with optional arguments
10+
Render the `AlgorithmsInterface.jl` documentation with optional arguments
1011
11-
Arguments
12-
* `--help` print this help and exit without rendering the documentation
13-
* `--prettyurls` toggle the pretty urls part to true, which is always set on CI
14-
""")
12+
Arguments
13+
* `--help` print this help and exit without rendering the documentation
14+
* `--prettyurls` toggle the pretty urls part to true, which is always set on CI
15+
"""
16+
)
1517
exit(0)
1618
end
1719

0 commit comments

Comments
 (0)