mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:43 +00:00
Exit with an error if there are check failures (#12735)
This commit is contained in:
parent
dc6aafecc2
commit
df7345e118
4 changed files with 95 additions and 37 deletions
|
@ -25,7 +25,7 @@ pub(crate) use connection::ClientSender;
|
|||
|
||||
pub(crate) type Result<T> = std::result::Result<T, api::Error>;
|
||||
|
||||
pub struct Server {
|
||||
pub(crate) struct Server {
|
||||
connection: Connection,
|
||||
client_capabilities: ClientCapabilities,
|
||||
worker_threads: NonZeroUsize,
|
||||
|
@ -33,7 +33,7 @@ pub struct Server {
|
|||
}
|
||||
|
||||
impl Server {
|
||||
pub fn new(worker_threads: NonZeroUsize) -> crate::Result<Self> {
|
||||
pub(crate) fn new(worker_threads: NonZeroUsize) -> crate::Result<Self> {
|
||||
let connection = ConnectionInitializer::stdio();
|
||||
|
||||
let (id, init_params) = connection.initialize_start()?;
|
||||
|
@ -113,7 +113,7 @@ impl Server {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn run(self) -> crate::Result<()> {
|
||||
pub(crate) fn run(self) -> crate::Result<()> {
|
||||
type PanicHook = Box<dyn Fn(&PanicInfo<'_>) + 'static + Sync + Send>;
|
||||
struct RestorePanicHook {
|
||||
hook: Option<PanicHook>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue