Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 19, 2024
1 parent 37c4649 commit 4e9cdff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions crates/oxc_language_server/src/linter/error_with_position.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

use std::{path::PathBuf, str::FromStr};

use tower_lsp::lsp_types::{
self, CodeDescription, DiagnosticRelatedInformation, NumberOrString, Position, Range, Url,
};

use oxc_diagnostics::{Error, Severity};
use cow_utils::CowUtils;
use oxc_diagnostics::{Error, Severity};

use crate::linter::offset_to_position;

Expand All @@ -28,7 +27,6 @@ pub struct LabeledSpanWithPosition {
pub message: Option<String>,
}


#[derive(Debug, Clone)]
pub struct DiagnosticReport {
pub diagnostic: lsp_types::Diagnostic,
Expand Down Expand Up @@ -164,4 +162,4 @@ impl ErrorWithPosition {
fixed_content: self.fixed_content,
}
}
}
}
4 changes: 2 additions & 2 deletions crates/oxc_language_server/src/linter/server_linter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use tower_lsp::lsp_types::Url;

use oxc_linter::{FixKind, Linter};

use crate::linter::isolated_lint_handler::IsolatedLintHandler;
use crate::linter::error_with_position::DiagnosticReport;
use crate::linter::isolated_lint_handler::IsolatedLintHandler;

pub struct ServerLinter {
linter: Arc<Linter>,
Expand All @@ -25,4 +25,4 @@ impl ServerLinter {
IsolatedLintHandler::new(Arc::clone(&self.linter))
.run_single(&uri.to_file_path().unwrap(), content)
}
}
}

0 comments on commit 4e9cdff

Please sign in to comment.