Add formatter check for backtick line continuation - #2580
Conversation
Co-authored-by: OpenAI Codex <noreply@openai.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
ASVLCII please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
1 similar comment
|
ASVLCII please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
Pull request overview
Adds a new CodeFormatter check to flag PowerShell backtick line continuations (via tokenization) and wires it into the existing .build/Invoke-CodeFormatterOnFiles.ps1 pipeline so offenders are reported with file + line number and counted as formatter errors.
Changes:
- Dot-sources and invokes
CheckBacktickLineContinuationas part of the per-file formatter check sequence. - Introduces
CheckBacktickLineContinuation.ps1, which tokenizes.ps1/.psm1files and warns onLineContinuationtokens (backtick continuations).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.build/Invoke-CodeFormatterOnFiles.ps1 |
Wires the new backtick-continuation check into the formatter pipeline and error counting. |
.build/CodeFormatterChecks/CheckBacktickLineContinuation.ps1 |
Implements the token-based detection and warning output for backtick line continuations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT License. |
Summary
Adds a token-based formatter check for PowerShell backtick line continuations. It reports each offending file and line, and intentionally does not modify source when -Save is used.
Closes #2573.
Validation
AI assistance: OpenAI Codex helped implement and validate this focused change.