mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-14 19:55:03 +01:00
formatting!
This commit is contained in:
parent
770762b920
commit
cae9683bd4
33 changed files with 147 additions and 87 deletions
|
|
@ -1,7 +1,9 @@
|
|||
use crate::{project_root, yarn_install};
|
||||
use anyhow::ensure;
|
||||
use std::process::Command;
|
||||
|
||||
use anyhow::ensure;
|
||||
|
||||
use crate::{project_root, yarn_install};
|
||||
|
||||
pub fn main() -> anyhow::Result<()> {
|
||||
println!("$ cargo fmt --check");
|
||||
let status = Command::new("cargo")
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ mod parser;
|
|||
mod random;
|
||||
mod write;
|
||||
|
||||
use anyhow::{bail, Context};
|
||||
use heck::ToUpperCamelCase;
|
||||
use std::{
|
||||
fs,
|
||||
fs::File,
|
||||
|
|
@ -15,6 +13,9 @@ use std::{
|
|||
process::Command,
|
||||
str::FromStr,
|
||||
};
|
||||
|
||||
use anyhow::{bail, Context};
|
||||
use heck::ToUpperCamelCase;
|
||||
use strong_xml::XmlRead;
|
||||
|
||||
#[derive(Debug, XmlRead)]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
use super::{Amqp, Assert, Class, Domain, Method};
|
||||
use crate::codegen::Codegen;
|
||||
use heck::{ToSnakeCase, ToUpperCamelCase};
|
||||
use itertools::Itertools;
|
||||
|
||||
use super::{Amqp, Assert, Class, Domain, Method};
|
||||
use crate::codegen::Codegen;
|
||||
|
||||
fn method_function_name(class_name: &str) -> impl Fn(&Method) -> String + '_ {
|
||||
move |method| {
|
||||
let method_name = method.name.to_snake_case();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
use crate::codegen::{Amqp, Codegen};
|
||||
use heck::ToUpperCamelCase;
|
||||
|
||||
use crate::codegen::{Amqp, Codegen};
|
||||
|
||||
impl Codegen {
|
||||
pub fn codegen_random(&mut self, amqp: &Amqp) {
|
||||
writeln!(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
use crate::codegen::{Amqp, Codegen};
|
||||
use heck::ToUpperCamelCase;
|
||||
|
||||
use crate::codegen::{Amqp, Codegen};
|
||||
|
||||
impl Codegen {
|
||||
pub fn codegen_write(&mut self, amqp: &Amqp) {
|
||||
writeln!(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
use crate::{project_root, yarn_install};
|
||||
use anyhow::ensure;
|
||||
use std::process::Command;
|
||||
|
||||
use anyhow::ensure;
|
||||
|
||||
use crate::{project_root, yarn_install};
|
||||
|
||||
pub fn main() -> anyhow::Result<()> {
|
||||
println!("$ cargo fmt");
|
||||
let status = Command::new("cargo")
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
use anyhow::{ensure, Context, Result};
|
||||
use std::{
|
||||
path::{Path, PathBuf},
|
||||
process::Command,
|
||||
};
|
||||
|
||||
use anyhow::{ensure, Context, Result};
|
||||
|
||||
mod check_fmt;
|
||||
mod codegen;
|
||||
mod fmt;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
use crate::{project_root, yarn_install};
|
||||
use anyhow::{ensure, Context, Result};
|
||||
use std::{path::Path, process::Command, thread::sleep, time::Duration};
|
||||
|
||||
use anyhow::{ensure, Context, Result};
|
||||
|
||||
use crate::{project_root, yarn_install};
|
||||
|
||||
pub fn main() -> Result<()> {
|
||||
let project_root = project_root();
|
||||
let test_js_root = project_root.join("test-js");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue