Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Fix build scripts (#69)
Browse files Browse the repository at this point in the history
* Add more excludes to CheckLicenses.ps1

This patch adds the .vs, bin and packages directories to the exclusion
list in CheckLicenses.ps1 to avoid unnecessary warning messages.

Ideally, we would use the output of `git status --ignored --porcelain`
to populate the list of ignored directories.

* Set working directory in InspectCode.ps1

All build scripts use Set-Location to set the current working directory
to the location of the executed script to make sure that it can be
executed from any location.  Only InspectCode.ps1 would only work if
called from the src directory.  This patch changes InspectCode.ps1 to
also set the working directory.
  • Loading branch information
krahlro-sick committed Jun 30, 2020
1 parent cbe9b54 commit dabb94d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/CheckLicenses.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ function Main
$excludes = @{
$( Join-Path $srcDir ".config" ) = $true
$( Join-Path $srcDir ".idea" ) = $true
$( Join-Path $srcDir ".vs" ) = $true
$( Join-Path $srcDir "bin" ) = $true
$( Join-Path $srcDir "packages" ) = $true
}

$acceptedDirs = @()
Expand Down
4 changes: 3 additions & 1 deletion src/InspectCode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Main
$artefactsDir = CreateAndGetArtefactsDir
$codeInspectionPath = Join-Path $artefactsDir "resharper-code-inspection.xml"

Set-Location $PSScriptRoot

Write-Host "Inspecting the code with inspectcode.exe ..."

# InspectCode passes over the properties to MSBuild,
Expand Down Expand Up @@ -50,4 +52,4 @@ function Main
}
}

Main
Main

0 comments on commit dabb94d

Please sign in to comment.