aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-06-13 12:41:19 +0100
committerAleksey Kladov <[email protected]>2021-06-13 12:55:45 +0100
commitefa069d28818dd074afd2c7cee776907b63ca012 (patch)
tree39f3ff2d5154bb62df5e4611f7054e1f7e96eb2f /xtask/src
parent546be18e3a91e4844b0dacc76c9f055397b6d89e (diff)
internal: start new diagnostics API
At the moment, this moves only a single diagnostic, but the idea is reafactor the rest to use the same pattern. We are going to have a single file per diagnostic. This file will define diagnostics code, rendering range and fixes, if any. It'll also have all of the tests. This is similar to how we deal with assists. After we refactor all diagnostics to follow this pattern, we'll probably move them to a new `ide_diagnostics` crate. Not that we intentionally want to test all diagnostics on this layer, despite the fact that they are generally emitted in the guts on the compiler. Diagnostics care to much about the end presentation details/fixes to be worth-while "unit" testing. So, we'll unit-test only the primary output of compilation process (types and name res tables), and will use integrated UI tests for diagnostics.
Diffstat (limited to 'xtask/src')
-rw-r--r--xtask/src/tidy.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/xtask/src/tidy.rs b/xtask/src/tidy.rs
index e6fa5868d..f2ba8efef 100644
--- a/xtask/src/tidy.rs
+++ b/xtask/src/tidy.rs
@@ -372,7 +372,10 @@ impl TidyDocs {
372 self.contains_fixme.push(path.to_path_buf()); 372 self.contains_fixme.push(path.to_path_buf());
373 } 373 }
374 } else { 374 } else {
375 if text.contains("// Feature:") || text.contains("// Assist:") { 375 if text.contains("// Feature:")
376 || text.contains("// Assist:")
377 || text.contains("// Diagnostic:")
378 {
376 return; 379 return;
377 } 380 }
378 self.missing_docs.push(path.display().to_string()); 381 self.missing_docs.push(path.display().to_string());