Skip to content

fix: Restrict continue comment to whitespace separated slashes#321230

Merged
dmitrivMS merged 2 commits into
microsoft:mainfrom
RedCMD:restrictContinueComment
Jun 14, 2026
Merged

fix: Restrict continue comment to whitespace separated slashes#321230
dmitrivMS merged 2 commits into
microsoft:mainfrom
RedCMD:restrictContinueComment

Conversation

@RedCMD

@RedCMD RedCMD commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

fixes #298057

comments now must take up an entire line
OR
be surrounded with at least one whitespace before and after

cc @aiday-mar

Copilot AI review requested due to automatic review settings June 12, 2026 21:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 / afterText regexes for // line-comment continuation across many extensions.
  • Simplified several configs from { "pattern": "..." } objects to plain regex strings for beforeText / 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.

Comment thread extensions/typescript-basics/language-configuration.json
Comment thread extensions/javascript/javascript-language-configuration.json
Comment thread extensions/csharp/language-configuration.json
@dmitrivMS

Copy link
Copy Markdown
Contributor

@RedCMD Could you please address the other Copilot comments?

@RedCMD

RedCMD commented Jun 13, 2026

Copy link
Copy Markdown
Contributor Author

I had addressed the comments in the original description before copilot spoke

@dmitrivMS

dmitrivMS commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

@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.

@dmitrivMS dmitrivMS enabled auto-merge (squash) June 13, 2026 21:19
@dmitrivMS dmitrivMS merged commit 9b43a71 into microsoft:main Jun 14, 2026
38 of 40 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.125.0 milestone Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Built-in Swift language configuration treats all occurrences of // as line comments

4 participants