Skip to content

fix(linting): add summary timestamp to PSScriptAnalyzer output#1211

Open
XiaoPengMei wants to merge 9 commits intomicrosoft:mainfrom
XiaoPengMei:add-psscriptanalyzer-timestamp-1002
Open

fix(linting): add summary timestamp to PSScriptAnalyzer output#1211
XiaoPengMei wants to merge 9 commits intomicrosoft:mainfrom
XiaoPengMei:add-psscriptanalyzer-timestamp-1002

Conversation

@XiaoPengMei
Copy link
Copy Markdown

Summary

  • add Timestamp = Get-StandardTimestamp to the psscriptanalyzer-summary.json output
  • extend the Pester coverage to verify the summary JSON includes a UTC timestamp field

Testing

  • pwsh -NoProfile -File scripts/tests/Invoke-PesterTests.ps1 -TestPath scripts/tests/linting/Invoke-PSScriptAnalyzer.Tests.ps1
  • npm run lint:ps
  • pwsh -NoProfile -Command "& './scripts/linting/Invoke-PSScriptAnalyzer.ps1' -OutputPath 'logs/psscriptanalyzer-results.json'; Get-Content 'logs/psscriptanalyzer-summary.json'"

@XiaoPengMei XiaoPengMei requested a review from a team as a code owner March 26, 2026 13:20
@XiaoPengMei
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.71%. Comparing base (84ddd5d) to head (3b8c167).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1211      +/-   ##
==========================================
- Coverage   87.72%   87.71%   -0.01%     
==========================================
  Files          61       61              
  Lines        9320     9321       +1     
==========================================
  Hits         8176     8176              
- Misses       1144     1145       +1     
Flag Coverage Δ
pester 85.31% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
scripts/linting/Invoke-PSScriptAnalyzer.ps1 87.05% <100.00%> (+0.15%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@rezatnoMsirhC rezatnoMsirhC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mention "Closes #1002" in the PR description. Otherwise LGTM. Thanks!

@WilliamBerryiii
Copy link
Copy Markdown
Member

@auyidi1 or @rezatnoMsirhC ... can you please re-review and approve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants