Skip to content

Commit b28dc9a

Browse files
authored
Remove --preview as a required argument for ruff server (#12053)
## Summary `ruff server` has reached a point of stabilization, and `--preview` is no longer required as a flag. `--preview` is still supported as a flag, since future features may be need to gated behind it initially. ## Test Plan A simple way to test this is to run `ruff server` from the command line. No error about a missing `--preview` argument should be reported.
1 parent 59ea94c commit b28dc9a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

crates/ruff/src/commands/server.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ use crate::ExitStatus;
44
use anyhow::Result;
55
use ruff_server::Server;
66

7-
pub(crate) fn run_server(preview: bool, worker_threads: NonZeroUsize) -> Result<ExitStatus> {
8-
if !preview {
9-
tracing::error!("--preview needs to be provided as a command line argument while the server is still unstable.\nFor example: `ruff server --preview`");
10-
return Ok(ExitStatus::Error);
11-
}
12-
7+
pub(crate) fn run_server(_preview: bool, worker_threads: NonZeroUsize) -> Result<ExitStatus> {
138
let server = Server::new(worker_threads)?;
149

1510
server.run().map(|()| ExitStatus::Success)

0 commit comments

Comments
 (0)