Skip to content
This repository was archived by the owner on Dec 29, 2023. It is now read-only.

Commit ff7adf8

Browse files
committed
Use JuliaFormatter.jl to format source code
1 parent c5946b7 commit ff7adf8

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.JuliaFormatter.toml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
indent = 2
2+
margin = 120
3+
always_for_in = true
4+
always_use_return = false
5+
whitespace_typedefs = false
6+
whitespace_in_kwargs = false
7+
whitespace_ops_in_indices = true
8+
remove_extra_newlines = true
9+
trailing_comma = false
10+
normalize_line_endings = "unix"

.github/workflows/FormatPR.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: FormatPR
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Install JuliaFormatter and format
12+
run: |
13+
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
14+
julia -e 'using JuliaFormatter; format(".")'
15+
- name: Create Pull Request
16+
id: cpr
17+
uses: peter-evans/create-pull-request@v5
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
commit-message: ":robot: Format .jl files"
21+
title: '[AUTO] JuliaFormatter.jl run'
22+
branch: auto-juliaformatter-pr
23+
delete-branch: true
24+
labels: formatting, automated pr, no changelog
25+
- name: Check outputs
26+
run: |
27+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
28+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 commit comments

Comments
 (0)