fix: Restrict continue comment to whitespace separated slashes#321230
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates multiple VS Code language configurations to unify and simplify onEnterRules behavior for continuing // (and /// in C#) comments when pressing Enter.
Changes:
- Standardized
beforeText/afterTextregexes for//line-comment continuation across many extensions. - Simplified several configs from
{ "pattern": "..." }objects to plain regex strings forbeforeText/afterText. - Adjusted C# rules to correctly continue
///documentation comments separately from//line comments.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| extensions/typescript-basics/language-configuration.json | Replaces prior TS-specific regex with a shared // continuation pattern. |
| extensions/swift/language-configuration.json | Simplifies beforeText/afterText patterns and standardizes // continuation. |
| extensions/rust/language-configuration.json | Simplifies and standardizes // continuation rule patterns. |
| extensions/php/language-configuration.json | Simplifies and standardizes // continuation rule patterns. |
| extensions/objective-c/language-configuration.json | Simplifies and standardizes // continuation rule patterns. |
| extensions/less/language-configuration.json | Simplifies and standardizes // continuation rule patterns. |
| extensions/json/language-configuration.json | Simplifies and standardizes // continuation rule patterns. |
| extensions/javascript/javascript-language-configuration.json | Replaces prior JS-specific regex with a shared // continuation pattern. |
| extensions/java/language-configuration.json | Simplifies and standardizes // continuation rule patterns. |
| extensions/groovy/language-configuration.json | Simplifies and standardizes // continuation rule patterns. |
| extensions/go/language-configuration.json | Simplifies and standardizes // continuation rule patterns. |
| extensions/csharp/language-configuration.json | Splits handling of /// doc comments vs // line comments and standardizes patterns. |
| extensions/cpp/language-configuration.json | Simplifies and standardizes // continuation rule patterns. |
|
@RedCMD Could you please address the other Copilot comments? |
|
I had addressed the comments in the original description before copilot spoke |
|
@RedCMD Thanks, because of how internal process for code-reviews works, it's best to resolve them if they are addressed - this will expedite the process. |
fixes #298057
comments now must take up an entire line
OR
be surrounded with at least one whitespace before and after
cc @aiday-mar