Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_cli): fix regression for rome lsp-proxy command #4491

Merged
merged 1 commit into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
## [Unreleased]

### CLI

#### Other changes

- Fix regression where the command `lsp-proxy` was renamed `lsp_proxy` [#4489](https://github.com/rome/tools/issues/4489)


### Configuration
### Editors
### Formatter
Expand Down
2 changes: 1 addition & 1 deletion crates/rome_cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub enum RomeCommand {
#[bpaf(command)]
Init,
/// Acts as a server for the Language Server Protocol over stdin/stdout
#[bpaf(command)]
#[bpaf(command("lsp-proxy"))]
LspProxy,
/// It updates the configuration when there are breaking changes
#[bpaf(command)]
Expand Down
28 changes: 28 additions & 0 deletions crates/rome_cli/tests/commands/lsp_proxy.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
use crate::run_cli;
use crate::snap_test::{assert_cli_snapshot, SnapshotPayload};
use bpaf::Args;
use rome_console::BufferConsole;
use rome_fs::MemoryFileSystem;
use rome_service::DynRef;

#[test]
fn lsp_proxy_help() {
let mut fs = MemoryFileSystem::default();
let mut console = BufferConsole::default();

let result = run_cli(
DynRef::Borrowed(&mut fs),
&mut console,
Args::from(&[("lsp-proxy"), "--help"]),
);

assert!(result.is_ok(), "run_cli returned {result:?}");

assert_cli_snapshot(SnapshotPayload::new(
module_path!(),
"lsp_proxy_help",
fs,
console,
result,
));
}
1 change: 1 addition & 0 deletions crates/rome_cli/tests/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ mod check;
mod ci;
mod format;
mod init;
mod lsp_proxy;
mod migrate;
mod rage;
mod version;
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
source: crates/rome_cli/tests/snap_test.rs
expression: content
---
# Emitted Messages

```block
Acts as a server for the Language Server Protocol over stdin/stdout


Available options:
-h, --help Prints help information

```