LME icon indicating copy to clipboard operation
LME copied to clipboard

Enforce PowerShell Linter Rules

Open adhilto opened this issue 1 year ago • 5 comments

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

  • [ ] Modify all existing PowerShell scripts to meet the linter's standard
  • [ ] Modify the workflow to enforce the linter rules

Describe alternatives you've considered N/A

Additional context N/A

adhilto avatar Jan 30 '24 23:01 adhilto

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

aarz-snl avatar Feb 12 '24 19:02 aarz-snl

What level will we throw on? Are warn OK?

cbaxley avatar Feb 12 '24 20:02 cbaxley

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.

adhilto avatar Feb 12 '24 20:02 adhilto

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 avatar Mar 01 '24 19:03 llwaterhouse

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

llwaterhouse avatar Mar 01 '24 19:03 llwaterhouse