Skip to content

Commit

Permalink
Merge pull request #44 from Lombiq/issue/OSOE-875
Browse files Browse the repository at this point in the history
OSOE-875: Analyzer violations don't show files and lines when run in GitHub Actions
  • Loading branch information
Piedone authored Jul 3, 2024
2 parents 11fc2d3 + 111f823 commit 462d624
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static-code-analysis-this-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
powershell-static-code-analysis:
name: PowerShell Static Code Analysis
uses: Lombiq/PowerShell-Analyzers/.github/workflows/static-code-analysis.yml@dev
uses: Lombiq/PowerShell-Analyzers/.github/workflows/static-code-analysis.yml@issue/OSOE-875
with:
# Making sure that analysis runs through both PowerShell editions regardless of the default configuration of the
# workflow and the underlying action to ensure backwards-compatibility.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
token: ${{ secrets.CHECKOUT_TOKEN }}

- name: PowerShell Static Code Analysis
uses: Lombiq/PowerShell-Analyzers/.github/actions/static-code-analysis@dev
uses: Lombiq/PowerShell-Analyzers/.github/actions/static-code-analysis@issue/OSOE-875
with:
run-windows-powershell: ${{ inputs.run-windows-powershell }}
run-powershell-core: ${{ inputs.run-powershell-core }}
Expand Down
2 changes: 1 addition & 1 deletion Lombiq.Analyzers.PowerShell/Invoke-Analyzer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function Write-FileError([string] $Message, [string] $Path, [int] $Line = 0, [in
if ($ForGitHubActions)
{
$Message = $Message -replace '\s*(\r?\n\s*)+', ' '
Write-Output "::error$(if ($Path) { " file=$Path,line=$Line,col=$Column::$Message" } else { "::$Message" })"
Write-Output "::error::$(if ($Path) { "$(Resolve-Path -Relative -Path $Path)($Line,$Column): " })$Message"
}
elseif ($ForMsBuild)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Lombiq.Analyzers.PowerShell" Version="1.4.0" />
<PackageReference Include="Lombiq.Analyzers.PowerShell" Version="1.4.1-alpha.0.osoe-875" />
</ItemGroup>

<Target Name="CopyFiles" BeforeTargets="PrepareForBuild">
Expand Down

0 comments on commit 462d624

Please sign in to comment.