Skip to content

Commit

Permalink
ci: add format check
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonVirgo committed Jul 17, 2024
1 parent 336cc2b commit c0ba393
Show file tree
Hide file tree
Showing 4 changed files with 496 additions and 31 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Rust Formatter

on: [push, pull_request]

jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install rustfmt
run: rustup component add rustfmt

- name: Check formatting
run: |
cargo fmt -- --check
if [ $? -ne 0 ]; then
echo "Code formatting issues found. Please run 'cargo fmt' locally to fix them."
exit 1
fi
Loading

0 comments on commit c0ba393

Please sign in to comment.