Skip to content

Commit

Permalink
Add diff to same command as prettier check so diff is obvious
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaSBrown committed Jan 2, 2025
1 parent 65be1fe commit e2266f2
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/javascript-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,14 @@ jobs:
# Step 4: Run Prettier to format code
- name: Run prettier
run: prettier "**/*.js" --write

# Step 5: Run Prettier to format code
- name: Run git diff to see the changes that would be made
run: git diff

# Step 6: Run Prettier to format code
- name: Reset git files
run: git reset --hard

# Step 7: Run Prettier to format code
- name: Run Check should fail if formatting is not up to spec
run: prettier --check "**/*.js"
run: |
prettier "**/*.js" --write
git diff
git reset --hard
prettier --check "**/*.js"
# Step 9: Report status
# Step 5: Report status
- name: Complete
run: echo "Formatting completed successfully!"

0 comments on commit e2266f2

Please sign in to comment.