diff options
author | Aleksey Kladov <[email protected]> | 2021-03-08 13:35:27 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-03-08 18:45:06 +0000 |
commit | 0f6f458cc1b460076093efda903bf1a1b9062697 (patch) | |
tree | 2e1db2d81bc3ab3f3a954e3ea9ce7ccffca64259 /xtask/src/tidy.rs | |
parent | 071dde1c1da10e3580bded99dc2d529074356536 (diff) |
Make working with codegen less annoying
We probably should look into removing `xtask codegen` altogether. The
test workflow works perfectly for package.json config.
There are two things preventing that:
* Lint completions are generated on demand.
* Docs are not committed to the repository.
Diffstat (limited to 'xtask/src/tidy.rs')
-rw-r--r-- | xtask/src/tidy.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/xtask/src/tidy.rs b/xtask/src/tidy.rs index 349ca14d0..3818b9e0f 100644 --- a/xtask/src/tidy.rs +++ b/xtask/src/tidy.rs | |||
@@ -13,30 +13,22 @@ use crate::{ | |||
13 | 13 | ||
14 | #[test] | 14 | #[test] |
15 | fn generated_grammar_is_fresh() { | 15 | fn generated_grammar_is_fresh() { |
16 | if let Err(error) = codegen::generate_syntax(Mode::Verify) { | 16 | codegen::generate_syntax(Mode::Ensure).unwrap() |
17 | panic!("{}. Please update it by running `cargo xtask codegen`", error); | ||
18 | } | ||
19 | } | 17 | } |
20 | 18 | ||
21 | #[test] | 19 | #[test] |
22 | fn generated_tests_are_fresh() { | 20 | fn generated_tests_are_fresh() { |
23 | if let Err(error) = codegen::generate_parser_tests(Mode::Verify) { | 21 | codegen::generate_parser_tests(Mode::Ensure).unwrap() |
24 | panic!("{}. Please update tests by running `cargo xtask codegen`", error); | ||
25 | } | ||
26 | } | 22 | } |
27 | 23 | ||
28 | #[test] | 24 | #[test] |
29 | fn generated_assists_are_fresh() { | 25 | fn generated_assists_are_fresh() { |
30 | if let Err(error) = codegen::generate_assists_tests(Mode::Verify) { | 26 | codegen::generate_assists_tests(Mode::Ensure).unwrap(); |
31 | panic!("{}. Please update assists by running `cargo xtask codegen`", error); | ||
32 | } | ||
33 | } | 27 | } |
34 | 28 | ||
35 | #[test] | 29 | #[test] |
36 | fn check_code_formatting() { | 30 | fn check_code_formatting() { |
37 | if let Err(error) = run_rustfmt(Mode::Verify) { | 31 | run_rustfmt(Mode::Ensure).unwrap() |
38 | panic!("{}. Please format the code by running `cargo format`", error); | ||
39 | } | ||
40 | } | 32 | } |
41 | 33 | ||
42 | #[test] | 34 | #[test] |