aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/diagnostics.rs
Commit message (Collapse)AuthorAgeFilesLines
* Only take first 500 syntax errorsyihuang2020-07-101-1/+2
| | | | Too many syntax errors make some editor/ide slow, fix #3434.
* Merge #5270bors[bot]2020-07-091-8/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5270: Add argument count mismatch diagnostic r=matklad a=jonas-schievink Closes https://github.com/rust-analyzer/rust-analyzer/issues/4025. This currently has one false positive on this line, where `max` is resolved to `Iterator::max` instead of `Ord::max`: https://github.com/rust-analyzer/rust-analyzer/blob/8aa10c00a4c5b957d459fac5a103cd9688e8dcdd/crates/expect/src/lib.rs#L263 (I have no idea why it thinks that `usize` is an `Iterator`) TODO: * [x] Tests * [x] Improve diagnostic text for method calls Co-authored-by: Jonas Schievink <[email protected]>
| * Remove unnecessary DiagnosticSink handlersJonas Schievink2020-07-091-16/+0
| |
| * Add argument count mismatch diagnosticJonas Schievink2020-07-091-0/+8
| |
* | Cleanup diagnostics testsAleksey Kladov2020-07-091-225/+123
| |
* | Reduce code duplicationAleksey Kladov2020-07-091-181/+147
|/
* Colorize more test fixturesLaurențiu Nicola2020-07-011-20/+22
|
* SimplifyAleksey Kladov2020-06-241-4/+2
|
* Use fixtures moreAleksey Kladov2020-06-241-19/+21
|
* More principled indentation trimming in fixturesAleksey Kladov2020-06-231-19/+4
|
* Don't offer to add missing fields of unknown typesLaurențiu Nicola2020-06-221-0/+3
|
* Merge #4851bors[bot]2020-06-191-2/+96
|\ | | | | | | | | | | | | | | | | | | | | | | 4851: Add quickfix to add a struct field r=TimoFreiberg a=TimoFreiberg Related to #4563 I created a quickfix for record literals first because the NoSuchField diagnostic was already there. To offer that quickfix for FieldExprs with unknown fields I'd need to add a new diagnostic (or create a `NoSuchField` diagnostic for those cases) I think it'd make sense to make this a snippet completion (to select the generated type), but this would require changing the `Analysis` API and I'd like some feedback before I touch that. Co-authored-by: Timo Freiberg <[email protected]>
| * Add quickfix to add a struct fieldTimo Freiberg2020-06-121-2/+96
| |
* | Anchor file-system operations to the file, and not to the source root.Aleksey Kladov2020-06-161-12/+8
|/ | | | | | | | | | | | | | | | Anchoring to the SourceRoot wont' work if the path is absolute: #[path = "/tmp/foo.rs"] mod foo; Anchoring to a file will. However, we *should* anchor, instead of just producing an abs path. I can imagine a situation where, for example, rust-analyzer processes crates from different machines (or, for example, from in-memory git branch), where the same absolute path in different crates might refer to different files in the end!
* simplify determining whether the field is a tuple fieldOptimalStrategy2020-06-121-5/+1
|
* Fix invalid shorthand initialization diagnostic for tuple structsOptimalStrategy2020-06-121-1/+18
|
* Update wrap return testsJonas Schievink2020-06-111-29/+17
| | | | Update "no diagnostic" tests, use `()` instead of `String`
* Make known paths use `core` instead of `std`Jonas Schievink2020-06-111-9/+9
|
* SimplifyAleksey Kladov2020-06-081-2/+2
|
* Fixed missing newline on each field on "Missing structure fields".Cadu2020-05-271-1/+1
|
* KISS SourceChangeAleksey Kladov2020-05-221-49/+52
| | | | | | The idea behind requiring the label is a noble one, but we are not really using it consistently anyway, and it should be easy to retrofit later, should we need it.
* Remove dead code for handling cursor positionsAleksey Kladov2020-05-211-2/+0
|
* Add AssistConfigAleksey Kladov2020-05-191-0/+2
|
* Fixup testsAleksey Kladov2020-05-051-6/+18
|
* Normalize naming of diagnosticsAleksey Kladov2020-05-051-6/+6
|
* Convert tests to text-sizeAleksey Kladov2020-04-251-4/+4
|
* Convert code to text-sizeAleksey Kladov2020-04-251-1/+1
|
* Correctly highlight ranges of diagnostics from macrosAleksey Kladov2020-04-171-6/+66
| | | | closes #2799
* missing match arms diagnosticJosh Mcguigan2020-04-071-1/+9
|
* Start stdxAleksey Kladov2020-03-281-11/+7
| | | | This crate will hold everything to small to be worth publishing
* Support aliases and Self in struct literalsFlorian Diebold2020-03-061-0/+27
| | | | Fixes #3306.
* Refactor primary IDE APIAleksey Kladov2020-02-261-3/+6
| | | | | | | | | | This introduces the new type -- Semantics. Semantics maps SyntaxNodes to various semantic info, such as type, name resolution or macro expansions. To do so, Semantics maintains a HashMap which maps every node it saw to the file from which the node originated. This is enough to get all the necessary hir bits just from syntax.
* Fill missing fields of enum variantsAleksey Kladov2020-02-191-0/+29
|
* ra_syntax: SyntaxError::range() now returns by valueVeetaha2020-02-171-1/+1
|
* ra_syntax: reshape SyntaxError for the sake of removing redundancyVeetaha2020-02-171-8/+2
|
* cleanup importsAleksey Kladov2020-02-061-1/+2
|
* Create modules via SourceBinderAleksey Kladov2020-01-161-4/+2
|
* Proper emit diagnostic without fixEdwin Cheng2020-01-071-19/+25
|
* Reject tuple index for missing fields assistEdwin Cheng2020-01-071-0/+8
|
* Rename Source -> InFileAleksey Kladov2019-11-281-1/+1
|
* rename ra_ide_api -> ra_ideAleksey Kladov2019-11-271-0/+652