~/talk

PowerShell Script Analyzer: Good, consistent and pretty code

Talkat PolarConf 2018 · on Tuesday, 2018-10-16· [devops-and-delivery]
slides:none on file

PSScriptAnalyzer lints PowerShell by walking the AST inspection and applying built‑in and custom rules; several rules expose a fix parameter so the analyzer can auto-fix suggestions like replacing aliases, reindenting, or remove trailing whitespace. Demo runs on a ~4,000‑line script show the fixer removed 503 trailing spaces; an experimental repo tool generates one commit per file with fixes (testing it on a 120,000‑line codebase succeeded but the customer asked not to run it again). Integration into CI and editor formatting also works.

AI-written summary · about

  1. 0:00Introduction
  2. 1:40Good code
  3. 4:41Script Analyzer
  4. 7:22Debate Demo
  5. 8:37AST
  6. 10:12Script blocks
  7. 12:13Script analyzer rules
  8. 16:09AD Health Check
  9. 18:04Remove all spaces
  10. 21:02Suggested correction
  11. 23:29Bad script
  12. 25:28What if
  13. 30:34extendable
  14. 35:15PowerShell Script Analyzer
  15. 37:25Format Selection
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.