Skip to content

Commit

Permalink
Add lint check
Browse files Browse the repository at this point in the history
Add run dotnet format check
virot authored Dec 21, 2024
1 parent eea9a89 commit 30e71a3
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/dotnet-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# dotnet-format.yaml
name: dotnet Format

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.x.x' # Specify the .NET version you're using

- name: Run dotnet format
run: dotnet format Module/powershellYK.csproj
continue-on-error: false

- name: Check for uncommitted changes
run: |
if [[ $(git status --porcelain) ]]; then
echo "There are uncommitted changes after running dotnet format."
exit 1
fi

0 comments on commit 30e71a3

Please sign in to comment.