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 60 forks source link

Enforce PowerShell Linter Rules #175

Open adhilto opened 5 months ago

adhilto commented 5 months ago

Is your feature request related to a problem? Please describe. The linter workflow is currently configured to always pass, regardless of anything it might find. As a result, code that does not meet its standards can (and has been) merged into main.

Describe the solution you'd like

Describe alternatives you've considered N/A

Additional context N/A

aarz-snl commented 4 months ago

Will need to run through and add 'exceptions' to items as well for items we see has not needing a 'fix'

cbaxley commented 4 months ago

What level will we throw on? Are warn OK?

adhilto commented 4 months ago

I personally don't think warning would be enough. If the linter doesn't cause the workflow to fail, I won't see it. So my preference would be to fail, not warn, but to add exceptions for anything we don't actually care about.

llwaterhouse commented 4 months ago

Additional comments from Alden:

Here's how you can get more details: Open any of the current open PRs Scroll down to the bottom, then where it says "All checks have passed," click "Show all checks." Click "Details" by the lint check Expand the results for the "Lint PowerShell Scripts" check. You'll see that PowerShell currently results in about 20 warnings. It's all just style best-practice stuff, nothing critical. I don't think it would be too hard to fix them. Probably about a week.

Image

llwaterhouse commented 4 months ago

Would this be a good candidate to try using Github Copilot?