Skip to content

Commit

Permalink
Use JuliaFormatter.jl to format source code (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascarv committed May 15, 2023
1 parent 4088c16 commit b7c41d9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
indent = 2
margin = 120
always_for_in = true
always_use_return = false
whitespace_typedefs = false
whitespace_in_kwargs = false
whitespace_ops_in_indices = true
remove_extra_newlines = true
trailing_comma = false
normalize_line_endings = "unix"
28 changes: 28 additions & 0 deletions .github/workflows/FormatPR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: FormatPR
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install JuliaFormatter and format
run: |
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; format(".")'
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: ":robot: Format .jl files"
title: '[AUTO] JuliaFormatter.jl run'
branch: auto-juliaformatter-pr
delete-branch: true
labels: formatting, automated pr, no changelog
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 comments on commit b7c41d9

Please sign in to comment.