Skip to content

Commit

Permalink
Use local dotnet-format version
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad committed Dec 19, 2024
1 parent 27ec329 commit 4619afc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
echo "::notice::Linting changed files only"
fi
dotnet format --verify-no-changes $INCLUDE_ARG
dotnet dotnet-format --verify-no-changes $INCLUDE_ARG
working-directory: TeachingRecordSystem

validate_terraform:
Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ test:

# Format the .NET solution and Terraform code
format:
@cd {{solution-root}} && dotnet format
@cd {{solution-root}} && dotnet dotnet-format
@terraform fmt terraform/aks

# Format any un-committed .tf or .cs files
Expand All @@ -64,7 +64,7 @@ format-changed:

$changedCsFiles = (Get-ChangedFiles "{{solution-root}}/**/*.cs") | foreach { $_ -Replace "^{{solution-root}}/", "" }
if ($changedCsFiles.Length -gt 0) {
$dotnetArgs = @("format", "--no-restore", "--include") + $changedCsFiles
$dotnetArgs = @("dotnet-format", "--no-restore", "--include") + $changedCsFiles
cd {{solution-root}} && dotnet $dotnetArgs
}

Expand Down

0 comments on commit 4619afc

Please sign in to comment.