mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
parent
46a5c42c75
commit
c95f2e0937
1 changed files with 5 additions and 4 deletions
|
|
@ -1,4 +1,3 @@
|
|||
use dashmap::DashMap;
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
fs,
|
||||
|
|
@ -7,16 +6,18 @@ use std::{
|
|||
sync::{Arc, Condvar, Mutex},
|
||||
};
|
||||
|
||||
use dashmap::DashMap;
|
||||
use rayon::{iter::ParallelBridge, prelude::ParallelIterator};
|
||||
use rustc_hash::FxHashSet;
|
||||
|
||||
use oxc_allocator::Allocator;
|
||||
use oxc_diagnostics::{DiagnosticSender, DiagnosticService};
|
||||
use oxc_parser::Parser;
|
||||
use oxc_resolver::{ResolveOptions, Resolver};
|
||||
use oxc_semantic::{ModuleRecord, SemanticBuilder};
|
||||
use oxc_span::{SourceType, VALID_EXTENSIONS};
|
||||
use rustc_hash::FxHashSet;
|
||||
|
||||
use crate::{Fixer, LintContext, LintOptions, Linter, Message};
|
||||
use rayon::{iter::ParallelBridge, prelude::ParallelIterator};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct LintService {
|
||||
|
|
@ -153,7 +154,7 @@ impl Runtime {
|
|||
|
||||
if !messages.is_empty() {
|
||||
let errors = messages.into_iter().map(|m| m.error).collect();
|
||||
let path = path.strip_prefix(&self.cwd).unwrap();
|
||||
let path = path.strip_prefix(&self.cwd).unwrap_or(path);
|
||||
let diagnostics = DiagnosticService::wrap_diagnostics(path, &source_text, errors);
|
||||
tx_error.send(Some(diagnostics)).unwrap();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue