GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — Preserve relative indentation in commented-out code by Copilot · Pull Request #2231 · PowerShell/PSScriptAnalyzer Conversation
|
There was an error while loading. Please reload this page.
| File | Description |
|---|---|
| Tests/Rules/UseConsistentIndentation.tests.ps1 | Adds comment-run formatting regression tests. |
| Rules/UseConsistentIndentation.cs | Incorporates relative comment offsets into indentation corrections. |
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
* Initial plan * Preserve indentation across comment runs Co-authored-by: bergmeister <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: bergmeister <[email protected]>
* Initial plan * Fix comment runs after line continuations Co-authored-by: bergmeister <[email protected]> * Fix continuation indent after comment runs Co-authored-by: bergmeister <[email protected]> * Include line continuations in comment scan Co-authored-by: bergmeister <[email protected]> * Apply last suggestion 'Prevent double-counting indentation in comment runs' #2238 (comment) * Fix Pester discovery by removing extra BOM Co-authored-by: bergmeister <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: bergmeister <[email protected]> Co-authored-by: Christoph Bergmeister <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Inline block comments and comment runs after pipes still have unresolved indentation errors.
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Confidence in all multiline comment-group boundaries remains limited, and the regression tests have not been run.
No open issues 🎉
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* Initial plan * Fix multiline comment group detection Co-authored-by: bergmeister <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: bergmeister <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stateful interactions between comment grouping, continuations, and pipelines warrant human validation of formatter correctness and repeated-formatting stability.
No open issues 🎉
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Add a regression test for standalone comments following trailing inline comments.\n\nCo-authored-by: Copilot <[email protected]> Co-authored-by: bergmeister <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Inline comments after line-leading pipes can still join standalone comment runs and incorrectly shift pipeline indentation.
No open issues 🎉
In code that hasn't changed since last review
Rules/UseConsistentIndentation.cs:373
With PipelineIndentation = 'NoIndentation', a line-leading pipe's trailing comment reaches this scan and is incorrectly grouped with following standalone comments. For a function containing a four-space-indented, backtick-continued foo, then | # trailing, # standalone, and bar, formatting moves the pipe from column 5 to column 11. Exclude comments with code before them as well as code after them from run-offset calculation.
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Copilot fix and add regression test. create new pr instead of pushing to this branch |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Christoph Bergmeister (@bergmeister) I've opened a new pull request, #2257, to work on those changes. Once the pull request is ready, I'll request review from you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* Initial plan * Exclude trailing pipe comments from comment runs Co-authored-by: bergmeister <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: bergmeister <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The implementation and regression coverage address the reported indentation loss, with no unresolved blocking findings.
No open issues 🎉
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: bergmeister <[email protected]> Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Recursive comment scanning interacts with continuation and pipeline indentation, warranting final human validation despite the extensive regression coverage.
No open issues 🎉
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
At least 1 approving review is required to merge this pull request.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
PSUseConsistentIndentation flattens the indentation of commented-out code
There was an error while loading. Please reload this page.