diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-01-18 15:57:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 15:57:30 -0500 |
commit | 35c1652f56f2a83380080b2c9942c595f80bd14d (patch) | |
tree | 4867dacfcbcbb01e7e1766d2fd8ce5e0a62ddf2b /cli/lsp/diagnostics.rs | |
parent | 4e3aff8400fe1e6854a27687d14a07dc837c88d9 (diff) |
fix(lsp): regression - formatting was broken on windows (#21972)
~~Waiting on: https://github.com/denoland/deno_config/pull/31~~
Closes #21971
Closes https://github.com/denoland/vscode_deno/issues/1029
Diffstat (limited to 'cli/lsp/diagnostics.rs')
-rw-r--r-- | cli/lsp/diagnostics.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index fb1849186..a09f7169d 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -1540,6 +1540,7 @@ mod tests { use crate::lsp::documents::Documents; use crate::lsp::documents::LanguageId; use crate::lsp::language_server::StateSnapshot; + use deno_config::glob::FilePatterns; use pretty_assertions::assert_eq; use std::path::Path; use std::path::PathBuf; @@ -1640,6 +1641,11 @@ let c: number = "a"; Arc::new(GlobalHttpCache::new(cache_location, RealDenoCacheEnv)); let ts_server = TsServer::new(Default::default(), cache); ts_server.start(None); + let lint_options = LintOptions { + rules: Default::default(), + files: FilePatterns::new_with_base(temp_dir.path().to_path_buf()), + reporter_kind: Default::default(), + }; // test enabled { @@ -1647,7 +1653,7 @@ let c: number = "a"; let diagnostics = generate_lint_diagnostics( &snapshot, &enabled_config, - &Default::default(), + &lint_options, Default::default(), ); assert_eq!(get_diagnostics_for_single(diagnostics).len(), 6); @@ -1679,7 +1685,7 @@ let c: number = "a"; let diagnostics = generate_lint_diagnostics( &snapshot, &disabled_config, - &Default::default(), + &lint_options, Default::default(), ); assert_eq!(get_diagnostics_for_single(diagnostics).len(), 0); |