Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync tools code from main branch to generation branch #24346

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .azure-pipelines/code-sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ jobs:
displayName: 'Install PowerShellGet [v2.1.3 has a Publish-Module bug]'

- task: DotNetCoreCLI@2
displayName: Build
displayName: Build For Target Module
condition: ne('${{ parameters.TargetModule }}', 'none')
inputs:
command: custom
custom: msbuild
arguments: 'build.proj /t:"Build;CopyAboutTopics;GenerateHelp" /p:"Configuration=Release;GenerateDocumentationFile=true;TargetModule=${{ parameters.TargetModule }}"'
- task: DotNetCoreCLI@2
displayName: Build
displayName: Build For Modified Modules
condition: eq('${{ parameters.TargetModule }}', 'none')
inputs:
command: custom
Expand Down
2 changes: 1 addition & 1 deletion build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@

<Target Name="StaticAnalysisExample" Condition="'$(RunStaticAnalysis)' == 'true'" AfterTargets="StaticAnalysisHelp">
<Message Importance="high" Text="Running static analysis for PowerShell examples..." />
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;. $(RepoTools)StaticAnalysis/ExampleAnalyzer/Measure-MarkdownOrScript.ps1 -MarkdownPaths $(RepoArtifacts)FilesChanged.txt -RulePaths $(RepoTools)StaticAnalysis/ExampleAnalyzer/AnalyzeRules/*.psm1 &quot;"/>
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;. $(RepoTools)StaticAnalysis/ExampleAnalyzer/Measure-MarkdownOrScript.ps1 -MarkdownPaths $(RepoArtifacts)FilesChanged.txt -RulePaths $(RepoTools)StaticAnalysis/ExampleAnalyzer/AnalyzeRules/*.psm1 -NotCleanScripts &quot;"/>
</Target>

<Target Name="StaticAnalysisFileChange" Condition="'$(RunStaticAnalysis)' == 'true'">
Expand Down
4 changes: 2 additions & 2 deletions tools/StaticAnalysis/ExampleAnalyzer/utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,10 @@ function Get-ScriptAnalyzerResult {

# Invoke PSScriptAnalyzer : input scriptblock, output error set in $result with property: RuleName, Message, Extent
if ($null -eq $RulePaths) {
$analysisResults = Invoke-ScriptAnalyzer -Path $ScriptPath -IncludeDefaultRules:$IncludeDefaultRules.IsPresent -Debug
$analysisResults = Invoke-ScriptAnalyzer -Path $ScriptPath -IncludeDefaultRules:$IncludeDefaultRules.IsPresent
}
else {
$analysisResults = Invoke-ScriptAnalyzer -Path $ScriptPath -CustomRulePath $RulePaths -IncludeDefaultRules:$IncludeDefaultRules.IsPresent -Debug
$analysisResults = Invoke-ScriptAnalyzer -Path $ScriptPath -CustomRulePath $RulePaths -IncludeDefaultRules:$IncludeDefaultRules.IsPresent
}
$errors = @()
foreach($analysisResult in $analysisResults){
Expand Down