aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
Diffstat (limited to 'xtask')
-rw-r--r--xtask/src/bin/pre-commit.rs2
-rw-r--r--xtask/src/lib.rs2
-rw-r--r--xtask/tests/tidy-tests/cli.rs (renamed from xtask/tests/cli.rs)6
-rw-r--r--xtask/tests/tidy-tests/docs.rs (renamed from xtask/tests/docs.rs)2
-rw-r--r--xtask/tests/tidy-tests/main.rs (renamed from xtask/tests/main.rs)0
5 files changed, 6 insertions, 6 deletions
diff --git a/xtask/src/bin/pre-commit.rs b/xtask/src/bin/pre-commit.rs
index 16bbf9cb2..4ee864756 100644
--- a/xtask/src/bin/pre-commit.rs
+++ b/xtask/src/bin/pre-commit.rs
@@ -2,7 +2,7 @@
2 2
3use std::process::Command; 3use std::process::Command;
4 4
5use ra_tools::{project_root, run, run_rustfmt, Overwrite, Result}; 5use xtask::{project_root, run, run_rustfmt, Overwrite, Result};
6 6
7fn main() -> Result<()> { 7fn main() -> Result<()> {
8 run_rustfmt(Overwrite)?; 8 run_rustfmt(Overwrite)?;
diff --git a/xtask/src/lib.rs b/xtask/src/lib.rs
index 761592e85..a8685f567 100644
--- a/xtask/src/lib.rs
+++ b/xtask/src/lib.rs
@@ -146,7 +146,7 @@ pub fn install_format_hook() -> Result<()> {
146 "./.git/hooks/pre-commit" 146 "./.git/hooks/pre-commit"
147 }); 147 });
148 if !result_path.exists() { 148 if !result_path.exists() {
149 run("cargo build --package ra_tools --bin pre-commit", ".")?; 149 run("cargo build --package xtask --bin pre-commit", ".")?;
150 if cfg!(windows) { 150 if cfg!(windows) {
151 fs::copy("./target/debug/pre-commit.exe", result_path)?; 151 fs::copy("./target/debug/pre-commit.exe", result_path)?;
152 } else { 152 } else {
diff --git a/xtask/tests/cli.rs b/xtask/tests/tidy-tests/cli.rs
index 609fd4d8b..5d8ddea83 100644
--- a/xtask/tests/cli.rs
+++ b/xtask/tests/tidy-tests/cli.rs
@@ -1,17 +1,17 @@
1use ra_tools::{gen_tests, generate_boilerplate, project_root, run_rustfmt, Verify};
2use walkdir::WalkDir; 1use walkdir::WalkDir;
2use xtask::{gen_tests, generate_boilerplate, project_root, run_rustfmt, Verify};
3 3
4#[test] 4#[test]
5fn generated_grammar_is_fresh() { 5fn generated_grammar_is_fresh() {
6 if let Err(error) = generate_boilerplate(Verify) { 6 if let Err(error) = generate_boilerplate(Verify) {
7 panic!("{}. Please update it by running `cargo gen-syntax`", error); 7 panic!("{}. Please update it by running `cargo xtask codegen`", error);
8 } 8 }
9} 9}
10 10
11#[test] 11#[test]
12fn generated_tests_are_fresh() { 12fn generated_tests_are_fresh() {
13 if let Err(error) = gen_tests(Verify) { 13 if let Err(error) = gen_tests(Verify) {
14 panic!("{}. Please update tests by running `cargo gen-tests`", error); 14 panic!("{}. Please update tests by running `cargo xtask gen-tests`", error);
15 } 15 }
16} 16}
17 17
diff --git a/xtask/tests/docs.rs b/xtask/tests/tidy-tests/docs.rs
index ea3330175..fe5852bc6 100644
--- a/xtask/tests/docs.rs
+++ b/xtask/tests/tidy-tests/docs.rs
@@ -5,7 +5,7 @@ use std::path::Path;
5 5
6use walkdir::{DirEntry, WalkDir}; 6use walkdir::{DirEntry, WalkDir};
7 7
8use ra_tools::project_root; 8use xtask::project_root;
9 9
10fn is_exclude_dir(p: &Path) -> bool { 10fn is_exclude_dir(p: &Path) -> bool {
11 let exclude_dirs = ["tests", "test_data"]; 11 let exclude_dirs = ["tests", "test_data"];
diff --git a/xtask/tests/main.rs b/xtask/tests/tidy-tests/main.rs
index 56d1318d6..56d1318d6 100644
--- a/xtask/tests/main.rs
+++ b/xtask/tests/tidy-tests/main.rs