Skip to content

Commit eefdd38

Browse files
committed
Fix schema generation
1 parent 4700d6f commit eefdd38

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/schema_json_gen/src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ use std::fs;
33

44
fn main() {
55
let schema = schemars::schema_for!(Emmyrc);
6-
let schema_json = serde_json::to_string_pretty(&schema).unwrap();
6+
let mut schema_json = serde_json::to_string_pretty(&schema).unwrap();
7+
if !schema_json.ends_with('\n') {
8+
schema_json.push('\n');
9+
}
710
let root_crates = std::env::current_dir().unwrap();
811
let output_path = root_crates.join("crates/emmylua_code_analysis/resources/schema.json");
912
println!("Output path: {:?}", output_path);

0 commit comments

Comments
 (0)