aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.dev-suite/hooked/pre-commit6
-rw-r--r--shared/src/lib.rs10
-rw-r--r--ticket/src/main.rs23
3 files changed, 32 insertions, 7 deletions
diff --git a/.dev-suite/hooked/pre-commit b/.dev-suite/hooked/pre-commit
index efcbaec..9ae83cf 100755
--- a/.dev-suite/hooked/pre-commit
+++ b/.dev-suite/hooked/pre-commit
@@ -1 +1,5 @@
-#! /bin/bash \ No newline at end of file
+#! /bin/bash
+cargo build --all
+cargo test --all
+cargo +nightly fmt --all -- --check
+cargo clippy --all --all-targets
diff --git a/shared/src/lib.rs b/shared/src/lib.rs
index 9fdcc27..138e8d0 100644
--- a/shared/src/lib.rs
+++ b/shared/src/lib.rs
@@ -1,5 +1,11 @@
-use anyhow::{bail, Result};
-use std::{env, path::PathBuf};
+use anyhow::{
+ bail,
+ Result,
+};
+use std::{
+ env,
+ path::PathBuf,
+};
pub fn find_root() -> Result<PathBuf> {
let mut location = env::current_dir()?;
diff --git a/ticket/src/main.rs b/ticket/src/main.rs
index 00b6715..9005471 100644
--- a/ticket/src/main.rs
+++ b/ticket/src/main.rs
@@ -1,9 +1,24 @@
-use anyhow::{bail, Result};
+use anyhow::{
+ bail,
+ Result,
+};
use colored::*;
-use rustyline::{error::ReadlineError, Editor};
-use serde::{Deserialize, Serialize};
+use rustyline::{
+ error::ReadlineError,
+ Editor,
+};
+use serde::{
+ Deserialize,
+ Serialize,
+};
use shared::find_root;
-use std::{env, fs, path::PathBuf, process, process::Command};
+use std::{
+ env,
+ fs,
+ path::PathBuf,
+ process,
+ process::Command,
+};
#[derive(structopt::StructOpt)]
enum Args {