cisagov / LME

Logging Made Easy (LME) is a no-cost and open logging and protective monitoring solution serving all organizations.
https://www.cisa.gov/resources-tools/services/logging-made-easy
Other
763 stars 59 forks source link

Enforce powershell linter rules #325

Open mitchelbaker-cisa opened 3 weeks ago

mitchelbaker-cisa commented 3 weeks ago

๐Ÿ—ฃ 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

โœ… Pre-merge Checklist

โœ… Post-merge Checklist