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

Enforce powershell linter rules #325

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mitchelbaker-cisa
Copy link
Collaborator

@mitchelbaker-cisa mitchelbaker-cisa commented Jun 4, 2024

🗣 Description

The linter workflow was configured to always pass despite any relevant warnings found. There have been situations where code that did not meet the linter's standards were merged into main. The placement of continue-on-error has been updated so the workflow catches relevant errors.

All PowerShell warnings have been addressed except for two files which call Invoke-Expression. The change is trivial but requires additional testing of SetupTestbed.ps1/install_lme.ps1 which is out of scope for this PR. See the issue below for more info.

💭 Motivation and context

Improves our CI/CD integrations and overall testing of LME.

Resolves #175

Additional todos after this PR is merged:

🧪 Testing

Ran the main.yml Github action, checked warnings/errors from PSScriptAnalyzer and applied necessary changes.

✅ Pre-approval checklist

  • Changes are limited to a single goal AND
    the title reflects this in a clear human readable format
  • Issue that this PR solves has been selected in the Development section
  • I have read and agree to LME's CONTRIBUTING.md document.
  • The PR adheres to LME's requirements in RELEASES.md
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated to reflect the changes in this PR.

✅ Pre-merge Checklist

  • All tests pass
  • PR has been tested and the documentation for testing is above
  • Squash and merge all commits into one PR level commit

✅ Post-merge Checklist

  • Delete the branch to keep down number of branches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Product Backlog
Development

Successfully merging this pull request may close these issues.

Enforce PowerShell Linter Rules
1 participant