Unnamed repository; edit this file 'description' to name the repository.
Run codegen commands as tests if their results are commited
Lukas Wirth 2024-07-07
parent 866102c · commit ce5046b
-rw-r--r--crates/parser/src/syntax_kind/generated.rs2
-rw-r--r--crates/syntax/src/ast/generated/nodes.rs2
-rw-r--r--crates/syntax/src/ast/generated/tokens.rs2
-rw-r--r--xtask/src/codegen/assists_doc_tests.rs5
-rw-r--r--xtask/src/codegen/grammar.rs5
-rw-r--r--xtask/src/codegen/parser_inline_tests.rs5
-rw-r--r--xtask/src/tidy.rs5
7 files changed, 23 insertions, 3 deletions
diff --git a/crates/parser/src/syntax_kind/generated.rs b/crates/parser/src/syntax_kind/generated.rs
index ef83420c52..ad3398453b 100644
--- a/crates/parser/src/syntax_kind/generated.rs
+++ b/crates/parser/src/syntax_kind/generated.rs
@@ -1,4 +1,4 @@
-//! Generated by `sourcegen_ast`, do not edit by hand.
+//! Generated by `cargo codegen grammar`, do not edit by hand.
#![allow(bad_style, missing_docs, unreachable_pub)]
#[doc = r" The kind of syntax node, e.g. `IDENT`, `USE_KW`, or `STRUCT`."]
diff --git a/crates/syntax/src/ast/generated/nodes.rs b/crates/syntax/src/ast/generated/nodes.rs
index bae529a2c8..ce189acd68 100644
--- a/crates/syntax/src/ast/generated/nodes.rs
+++ b/crates/syntax/src/ast/generated/nodes.rs
@@ -1,4 +1,4 @@
-//! Generated by `sourcegen_ast`, do not edit by hand.
+//! Generated by `cargo codegen grammar`, do not edit by hand.
#![allow(non_snake_case)]
use crate::{
diff --git a/crates/syntax/src/ast/generated/tokens.rs b/crates/syntax/src/ast/generated/tokens.rs
index 651a8ebbf7..85d20c2bd8 100644
--- a/crates/syntax/src/ast/generated/tokens.rs
+++ b/crates/syntax/src/ast/generated/tokens.rs
@@ -1,4 +1,4 @@
-//! Generated by `sourcegen_ast`, do not edit by hand.
+//! Generated by `cargo codegen grammar`, do not edit by hand.
use crate::{
ast::AstToken,
diff --git a/xtask/src/codegen/assists_doc_tests.rs b/xtask/src/codegen/assists_doc_tests.rs
index 1256232287..d06c9d65df 100644
--- a/xtask/src/codegen/assists_doc_tests.rs
+++ b/xtask/src/codegen/assists_doc_tests.rs
@@ -195,3 +195,8 @@ fn reveal_hash_comments(text: &str) -> String {
})
.fold(String::new(), |mut acc, it| format_to_acc!(acc, "{it}\n"))
}
+
+#[test]
+fn test() {
+ generate(true);
+}
diff --git a/xtask/src/codegen/grammar.rs b/xtask/src/codegen/grammar.rs
index 89db39411b..2d492f79f1 100644
--- a/xtask/src/codegen/grammar.rs
+++ b/xtask/src/codegen/grammar.rs
@@ -890,3 +890,8 @@ impl AstNodeSrc {
});
}
}
+
+#[test]
+fn test() {
+ generate(true);
+}
diff --git a/xtask/src/codegen/parser_inline_tests.rs b/xtask/src/codegen/parser_inline_tests.rs
index 7ad530ab01..5983b06e1b 100644
--- a/xtask/src/codegen/parser_inline_tests.rs
+++ b/xtask/src/codegen/parser_inline_tests.rs
@@ -127,3 +127,8 @@ fn existing_tests(dir: &Path, ok: bool) -> HashMap<String, (PathBuf, Test)> {
}
res
}
+
+#[test]
+fn test() {
+ generate(true);
+}
diff --git a/xtask/src/tidy.rs b/xtask/src/tidy.rs
index 98e52e7e97..e85f518286 100644
--- a/xtask/src/tidy.rs
+++ b/xtask/src/tidy.rs
@@ -338,3 +338,8 @@ fn find_marks(set: &mut HashSet<String>, text: &str, mark: &str) {
}
}
}
+
+#[test]
+fn test() {
+ Tidy {}.run(&Shell::new().unwrap()).unwrap();
+}