Skip to content

Commit

Permalink
add formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
rainyl committed Jun 28, 2024
1 parent 5f18ffc commit aae3d1e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/formatter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
push:
pull_request:

name: Format Code

jobs:
build:
name: format code
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Flutter
uses: subosito/flutter-action@v1
- name: Format code
run: |
dart format --line-length 110 \
$(find lib test -name '*.dart' -not -name '*.g.dart' -and -not -name '*.freezed.dart')
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "dart format ✅"
branch: ${{ github.head_ref }}

0 comments on commit aae3d1e

Please sign in to comment.