Skip to content

Commit

Permalink
Enable strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljurek authored and azure-sdk committed Sep 13, 2021
1 parent c5607df commit cf3308a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions eng/common/scripts/check-spelling-in-changed-files.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<#
.SYNOPSIS
Uses cspell (from NPM) to check spelling of recently changed files
Expand Down Expand Up @@ -67,6 +66,9 @@ Param (
[Parameter()]
[switch] $Test
)

Set-StrictMode -Version 3.0

function TestSpellChecker() {
Test-Exit0WhenAllFilesExcluded
ResetTest
Expand Down Expand Up @@ -182,7 +184,7 @@ function Test-Exit0WhenSpellingErrorsAndNoExitWithError() {

# Act
&"$PSScriptRoot/check-spelling-in-changed-files.ps1" `
-TargetBranch HEAD~1 `
-TargetBranch HEAD~1

# Assert
if ($LASTEXITCODE -ne 0) {
Expand Down Expand Up @@ -249,7 +251,6 @@ if ($Test) {
exit 0
}


$ErrorActionPreference = "Continue"
. $PSScriptRoot/common.ps1

Expand Down

0 comments on commit cf3308a

Please sign in to comment.