diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 51149f2b2..ebec0d33b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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: diff --git a/justfile b/justfile index 76f57c1ac..ae232c99b 100644 --- a/justfile +++ b/justfile @@ -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 @@ -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 }