Home
last modified time | relevance | path

Searched +full:ide +full:- +full:diagnostics (Results 1 – 25 of 43) sorted by relevance

12

/third_party/rust/rust/src/tools/rust-analyzer/crates/ide/
DCargo.toml2 name = "ide"
9 rust-version.workspace = true
15 cov-mark = "2.0.0-pre.1"
16 crossbeam-channel = "0.5.5"
21 pulldown-cmark-to-cmark = "10.0.4"
22 pulldown-cmark = { version = "0.9.1", default-features = false }
27 nohash-hasher.workspace = true
31 ide-assists.workspace = true
32 ide-completion.workspace = true
33 ide-db.workspace = true
[all …]
/third_party/rust/rust/src/tools/rust-analyzer/
DCargo.toml3 exclude = ["crates/proc-macro-test/imp"]
7 rust-version = "1.66"
9 license = "MIT OR Apache-2.0"
10 authors = ["rust-analyzer team"]
19 rowan.opt-level = 3
20 rustc-hash.opt-level = 3
21 smol_str.opt-level = 3
22 text-size.opt-level = 3
24 miniz_oxide.opt-level = 3
31 [patch.'crates-io']
[all …]
DCargo.lock8 source = "registry+https://github.com/rust-lang/crates.io-index"
17 source = "registry+https://github.com/rust-lang/crates.io-index"
21 name = "always-assert"
23 source = "registry+https://github.com/rust-lang/crates.io-index"
32 source = "registry+https://github.com/rust-lang/crates.io-index"
37 version = "1.0.0-beta.2"
38 source = "registry+https://github.com/rust-lang/crates.io-index"
44 source = "registry+https://github.com/rust-lang/crates.io-index"
50 source = "registry+https://github.com/rust-lang/crates.io-index"
56 source = "registry+https://github.com/rust-lang/crates.io-index"
[all …]
/third_party/rust/rust/src/tools/rust-analyzer/.github/workflows/
Dautopublish.yaml6 # - cron: "0 0 * * *" # midnight UTC
10 - release
15 runs-on: ubuntu-latest
17 - name: Checkout repository
20 fetch-depth: 0
22 - name: Install Rust toolchain
23 run: rustup update --no-self-update stable
25 - name: Install cargo-workspaces
26 run: cargo install cargo-workspaces
28 - name: Publish Crates
[all …]
/third_party/rust/rust/src/tools/rust-analyzer/crates/ide-diagnostics/
DCargo.toml2 name = "ide-diagnostics"
9 rust-version.workspace = true
15 cov-mark = "2.0.0-pre.1"
24 text-edit.workspace = true
27 ide-db.workspace = true
29 [dev-dependencies]
30 expect-test = "1.4.0"
33 test-utils.workspace = true
37 in-rust-tree = []
/third_party/rust/rust/src/tools/rust-analyzer/.github/ISSUE_TEMPLATE/
Dbug_report.md1 ---
3 about: Create a bug report for rust-analyzer.
5 labels: 'C-bug'
8 ---
10 <!--
11 Troubleshooting guide: https://rust-analyzer.github.io/manual.html#troubleshooting
12 Forum for questions: https://users.rust-lang.org/c/ide/14
16 …1. on-the-fly diagnostics are mostly unimplemented (`cargo check` diagnostics will be shown when s…
19 -->
21 **rust-analyzer version**: (eg. output of "rust-analyzer: Show RA Version" command, accessible in V…
[all …]
/third_party/rust/rust/src/tools/rust-analyzer/crates/rust-analyzer/src/
Ddiagnostics.rs1 //! Book keeping for keeping diagnostics easily in sync with the client.
6 use ide::FileId;
67 let diagnostics = self.check.entry(flycheck_id).or_default().entry(file_id).or_default(); in add_check_diagnostic() localVariable
68 for existing_diagnostic in diagnostics.iter() { in add_check_diagnostic()
76 diagnostics.push(diagnostic); in add_check_diagnostic()
83 diagnostics: Vec<lsp_types::Diagnostic>, in set_native_diagnostics()
86 if existing_diagnostics.len() == diagnostics.len() in set_native_diagnostics()
87 && diagnostics in set_native_diagnostics()
96 self.native.insert(file_id, diagnostics); in set_native_diagnostics()
103 ) -> impl Iterator<Item = &lsp_types::Diagnostic> { in diagnostics_for()
[all …]
Dconfig.rs14 use ide::{
34 diagnostics::DiagnosticsMapConfig,
42 // - Toggles (be it binary true/false or with more options in-between) should almost always suffix…
44 // - In general be wary of using the namespace of something verbatim, it prevents us from adding s…
45 // - Don't use abbreviations unless really necessary
46 // - foo_command = overrides the subcommand, foo_overrideCommand allows full overwriting, extra ar…
48 // Defines the server-side configuration of the rust-analyzer. We generate
50 // re-generate that file.
76 /// - "workspace": run build scripts for a workspace in the workspace's root directory.
77 …/// This is incompatible with `#rust-analyzer.cargo.buildScripts.invocationStrategy#` set to `on…
[all …]
Dcli.rs9 mod diagnostics; module
19 use ide::AnalysisHost;
31 pub fn is_verbose(self) -> bool { in is_verbose()
34 pub fn is_spammy(self) -> bool { in is_spammy()
39 fn read_stdin() -> Result<String> { in read_stdin()
57 let vfs = before.allocated - profile::memory_usage().allocated; in print_memory_usage()
61 let unaccounted = before.allocated - profile::memory_usage().allocated; in print_memory_usage()
Dlib.rs1 //! Implementation of the LSP for rust-analyzer.
3 //! This crate takes Rust-specific analysis results from ide and translates
9 //! The `cli` submodule implements some batch-processing analysis, primarily as
23 mod diagnostics; module
60 pub fn from_json<T: DeserializeOwned>(what: &'static str, json: &serde_json::Value) -> Result<T> { in from_json()
73 fn new(code: i32, message: String) -> LspError { in new()
79 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt()
Dmain_loop.rs1 //! The main loop of `rust-analyzer` responsible for dispatching LSP
29 pub fn main_loop(config: Config, connection: Connection) -> Result<()> { in main_loop()
38 // higher-priority thread. in main_loop()
40 // https://docs.microsoft.com/en-us/windows/win32/procthread/scheduling-priorities in main_loop()
41 // https://docs.microsoft.com/en-us/windows/win32/procthread/priority-boosts in main_loop()
42 // https://github.com/rust-lang/rust-analyzer/issues/2835 in main_loop()
65 Diagnostics(Vec<(FileId, Vec<lsp_types::Diagnostic>)>), enumerator
75 Report(ide::ParallelPrimeCachesProgress),
80 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt()
112 fn run(mut self, inbox: Receiver<lsp_server::Message>) -> Result<()> { in run()
[all …]
Dglobal_state.rs10 use ide::{Analysis, AnalysisHost, Cancellable, Change, FileId};
23 diagnostics::{CheckFixes, DiagnosticCollection},
62 pub(crate) diagnostics: DiagnosticCollection, field
102 /// We need both for the precise analysis, but we want rust-analyzer to be
106 /// This creates a complication -- by the time the second phase completes,
135 …// used to signal semantic highlighting to fall back to syntax based highlighting until proc-macro…
143 pub(crate) fn new(sender: Sender<lsp_server::Message>, config: Config) -> GlobalState { in new()
176 diagnostics: Default::default(), in new()
213 pub(crate) fn process_changes(&mut self) -> bool { in process_changes()
234 // None -> Delete => keep in process_changes()
[all …]
/third_party/rust/rust/src/tools/rust-analyzer/crates/ide-diagnostics/src/tests/
Dsourcegen.rs9 let diagnostics = Diagnostic::collect().unwrap(); in sourcegen_diagnostic_docs() localVariable
11 diagnostics.into_iter().map(|it| it.to_string()).collect::<Vec<_>>().join("\n\n"); in sourcegen_diagnostic_docs()
25 fn collect() -> io::Result<Vec<Diagnostic>> { in collect()
26 let handlers_dir = project_root().join("crates/ide-diagnostics/src/handlers"); in collect()
35 fn collect_file(acc: &mut Vec<Diagnostic>, path: PathBuf) -> io::Result<()> { in collect()
54 fn is_valid_diagnostic_name(diagnostic: &str) -> Result<(), String> { in is_valid_diagnostic_name()
63 return Err("Diagnostic can't contain non-ASCII symbols".into()); in is_valid_diagnostic_name()
70 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt()
/third_party/rust/rust/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/
Ddiagnostics.rs1 //! Analyze all modules in a project for diagnostics. Exits with a non-zero
8 use ide::{AssistResolveStrategy, DiagnosticsConfig, Severity};
16 impl flags::Diagnostics { implementation
17 pub fn run(self) -> anyhow::Result<()> { in run()
53 .diagnostics( in run()
83 fn all_modules(db: &dyn HirDatabase) -> Vec<Module> { in all_modules()
Dscip.rs13 use ide::{
29 pub fn run(self) -> Result<()> { in run()
35 let no_progress = &|s| (eprintln!("rust-analyzer: Loading {s}")); in run()
57 name: "rust-analyzer".to_owned(), in run()
144 diagnostics: Vec::new(), in run()
181 file_id: ide::FileId, in get_relative_filepath()
182 ) -> Option<String> { in get_relative_filepath()
190 fn text_range_to_scip_range(line_index: &LineIndex, range: TextRange) -> Vec<i32> { in text_range_to_scip_range()
204 ) -> scip_types::Descriptor { in new_descriptor_str()
213 fn new_descriptor(name: &str, suffix: scip_types::descriptor::Suffix) -> scip_types::Descriptor { in new_descriptor()
[all …]
/third_party/rust/rust/src/tools/rust-analyzer/crates/ide-diagnostics/src/
Dlib.rs1 //! Diagnostics rendering and fixits.
3 //! Most of the diagnostics originate from the dark depth of the compiler, and
6 //! user-authored source code. We are especially not in the position to offer
10 //! Instead, we "bubble up" raw, structured diagnostics until the `hir` crate,
13 //! ad-hoc at the moment. Anyways, we get a bunch of ide-friendly diagnostic
16 //! fixits. By the way, that's why we want to keep diagnostics structured
17 //! internally -- so that we have all the info to make fixes.
20 //! rendering, optional fixes and tests. It's OK if some low-level compiler
23 //! There are also a couple of ad-hoc diagnostics implemented directly here, we
60 // The handlers below are unusual, the implement the diagnostics as well.
[all …]
/third_party/rust/rust/src/tools/rust-analyzer/crates/rust-analyzer/tests/slow-tests/
Dtidy.rs8 #[cfg(not(feature = "in-rust-tree"))]
11 #[cfg(not(feature = "in-rust-tree"))]
17 let out = cmd!(sh, "rustup run stable rustfmt --version").read().unwrap(); in check_code_formatting()
21 Please run `rustup component add rustfmt --toolchain stable` to install it.", in check_code_formatting()
25 let res = cmd!(sh, "rustup run stable cargo fmt -- --check").run(); in check_code_formatting()
38 .read_file(sourcegen::project_root().join("crates/rust-analyzer/src/lsp_ext.rs")) in check_lsp_extensions_docs()
45 sh.read_file(sourcegen::project_root().join("docs/dev/lsp-extensions.md")).unwrap(); in check_lsp_extensions_docs()
57 lsp_ext.rs was changed without touching lsp-extensions.md. in check_lsp_extensions_docs()
62 Please adjust docs/dev/lsp-extensions.md. in check_lsp_extensions_docs()
121 Some(s) if s.contains("dev-dependencies") => { in check_cargo_toml()
[all …]
/third_party/rust/rust/src/tools/rust-analyzer/xtask/src/
Drelease.rs8 pub(crate) fn run(self, sh: &Shell) -> anyhow::Result<()> { in run()
11 cmd!(sh, "git fetch upstream --tags --force").run()?; in run()
12 cmd!(sh, "git reset --hard tags/nightly").run()?; in run()
13 // The `release` branch sometimes has a couple of cherry-picked in run()
15 // it. As we are setting `release` branch to an up-to-date `nightly` in run()
19 // commits -- they'll be kept alive by the tag. More generally, we in run()
22 cmd!(sh, "git push --force").run()?; in run()
26 cmd!(sh, "cargo test -p ide-assists -p ide-diagnostics -p rust-analyzer -- sourcegen_") in run()
29 let website_root = project_root().join("../rust-analyzer.github.io"); in run()
38 let commit = cmd!(sh, "git rev-parse HEAD").read()?; in run()
[all …]
/third_party/rust/rust/src/tools/rust-analyzer/crates/ide-assists/src/
Dlib.rs4 //! An assist is a micro-refactoring, which is automatically activated in
10 //! Assists are the main mechanism to deliver advanced IDE features to the user,
13 //! The power of assists comes from their context-awareness. The main problem
14 //! with IDE features is that there are a lot of them, and it's hard to teach
17 //! actions. Contrast it with Emacs `M-x`, which just spits an infinite list of
26 //! pairs: "if let <-> match".
40 //! * Make assists robust. If the assist depends on results of type-inference too
41 //! much, it might only fire in fully-correct code. This makes assist less
44 //! * Make small assists, which compose. Example: rather than auto-importing
45 //! enums in `add_missing_match_arms`, we use fully-qualified names. There's a
[all …]
/third_party/rust/rust/src/tools/rust-analyzer/docs/user/
Dmanual.adoc4 :page-layout: post
6 :source-highlighter: rouge
10 IMPORTANT: the master copy of this document lives in the https://github.com/rust-lang/rust-analyzer…
13 At its core, rust-analyzer is a *library* for semantic analysis of Rust code as it changes over tim…
14 This manual focuses on a specific usage of the library -- running it as part of a server that imple…
15 https://microsoft.github.io/language-server-protocol/[Language Server Protocol] (LSP).
22 https://github.com/rust-lang/rust-analyzer/blob/master/docs/user/manual.adoc[https://github.com/rus…
24 … which are generated from the source code. Run `cargo test` and `cargo test -p xtask` to create th…
27 If you have questions about using rust-analyzer, please ask them in the https://users.rust-lang.org…
31 In theory, one should be able to just install the <<rust-analyzer-language-server-binary,`rust-anal…
[all …]
/third_party/rust/rust/src/tools/rust-analyzer/crates/ide/src/
Dlib.rs1 //! ide crate provides "ide-centric" APIs for the rust-analyzer. That is,
7 //! However, IDE specific bits of the analysis (most notably completion) happen
147 pub fn new(range: TextRange, info: T) -> RangeInfo<T> { in new()
159 pub fn new(lru_capacity: Option<usize>) -> AnalysisHost { in new()
173 pub fn analysis(&self) -> Analysis { in analysis()
184 pub fn per_query_memory_usage(&mut self) -> Vec<(String, profile::Bytes, usize)> { in per_query_memory_usage()
190 pub fn raw_database(&self) -> &RootDatabase { in raw_database()
193 pub fn raw_database_mut(&mut self) -> &mut RootDatabase { in raw_database_mut()
203 fn default() -> AnalysisHost { in default()
226 // `AnalysisHost` for creating a fully-featured analysis.
[all …]
/third_party/rust/rust/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/
Dnotification.rs20 pub(crate) fn handle_cancel(state: &mut GlobalState, params: CancelParams) -> Result<()> { in handle_cancel()
32 ) -> Result<()> { in handle_work_done_progress_cancel()
34 if let Some(id) = s.strip_prefix("rust-analyzer/flycheck/") { in handle_work_done_progress_cancel()
52 ) -> Result<()> { in handle_did_open_text_document()
71 ) -> Result<()> { in handle_did_change_text_document()
103 ) -> Result<()> { in handle_did_close_text_document()
123 ) -> Result<()> { in handle_did_save_text_document()
125 // Re-fetch workspaces if a workspace related file has changed in handle_did_save_text_document()
149 ) -> Result<()> { in handle_did_change_configuration()
150 // As stated in https://github.com/microsoft/language-server-protocol/issues/676, in handle_did_change_configuration()
[all …]
/third_party/rust/rust/src/tools/clippy/clippy_lints/src/
Dpattern_type_mismatch.rs1 use clippy_utils::diagnostics::span_lint_and_help;
25 /// is recommended to look at IDE options available to you to highlight types, lifetimes
132 fn apply_lint(cx: &LateContext<'_>, pat: &Pat<'_>, deref_possible: DerefPossible) -> bool { in apply_lint()
165 fn find_first_mismatch(cx: &LateContext<'_>, pat: &Pat<'_>) -> Option<(Span, Mutability, Level)> { in find_first_mismatch()
/third_party/rust/rust/src/tools/rust-analyzer/crates/hir-def/src/
Dnameres.rs1 //! This module implements import-resolution/macro expansion algorithm.
18 //! set of top-level items. Nested imports are desugared to flat imports in this
44 //! Macros from other crates (including proc-macros) can be used with
52 pub mod diagnostics; module
76 nameres::{diagnostics::DefDiagnostic, path_resolution::ResolveMode},
87 /// item-level macros have been expanded.
105 /// The prelude is empty for non-block DefMaps (unless `#[prelude_import]` was used,
117 /// The diagnostics that need to be emitted for this crate.
118 diagnostics: Vec<DefDiagnostic>, field
133 /// The error that occurred when failing to load the proc-macro dll.
[all …]
/third_party/cJSON/tests/unity/docs/
DUnityHelperScriptsGuide.md5 Sometimes what it takes to be a really efficient C programmer is a little non-C.
9 likely to work. You can find Ruby at [ruby-lang.org](https://ruby-labg.org/).
16 suite? Do you want to use CMock or other fancy add-ons but don't want to figure
74 - stdio.h
75 - microdefs.h
90 builds - or more likely the Ruby-based build tool Rake - is requiring this
138 suite. The linker will look for this symbol and fall back to a Unity-provided
145 finished. An integer variable `num_failures` is available for diagnostics.
152 back to a Unity-provided stub if it is not found.
178 -:cexception
[all …]

12