Skip to content

Use style50 as the sole underlying formatter#12

Merged
rongxin-liu merged 3 commits into
mainfrom
style50-cli-refactor
Mar 21, 2026
Merged

Use style50 as the sole underlying formatter#12
rongxin-liu merged 3 commits into
mainfrom
style50-cli-refactor

Conversation

@rongxin-liu

@rongxin-liu rongxin-liu commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Related PR: cs50/style50#130

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the VS Code extension to route formatting through the external style50 CLI (rather than using in-extension formatters), while keeping a C/C++/Java syntax pre-check to prevent running format on code that doesn’t compile.

Changes:

  • Removed js-beautify and sql-formatter usage/dependencies and replaced per-language formatting logic with a single style50 -o format ... invocation.
  • Kept a clang -fsyntax-only pre-check for C/C++/Java before invoking style50.
  • Updated command visibility in package.json to include sql files.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/extension.ts Removes language-specific formatting logic and delegates formatting output generation to style50, adding small shell-escaping and clang-format-style resolution helpers.
package.json Updates command “when” clauses (adds sql) and removes formatter dependencies.
package-lock.json Reflects dependency removals and engine version bump.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/extension.ts Outdated
Comment thread src/extension.ts Outdated
Comment thread src/extension.ts Outdated
Comment thread src/extension.ts Outdated
@rongxin-liu rongxin-liu merged commit 9f02b9b into main Mar 21, 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.

2 participants