diff --git a/neveko-gui/src/apps/home.rs b/neveko-gui/src/apps/home.rs index a2c8036..9328e1b 100644 --- a/neveko-gui/src/apps/home.rs +++ b/neveko-gui/src/apps/home.rs @@ -1,8 +1,11 @@ #![deny(clippy::all)] #![forbid(unsafe_code)] -use egui::{RichText, Color32}; use eframe::egui; +use egui::{ + Color32, + RichText, +}; use image::Luma; use neveko_core::*; use qrcode::QrCode; @@ -423,7 +426,6 @@ impl eframe::App for HomeApp { .size(16.0) .color(color), ).on_hover_text(hover_txt); - }); }); ui.horizontal(|ui| { diff --git a/scripts/build_all_and_run.sh b/scripts/build_all_and_run.sh index 726f896..3526d67 100755 --- a/scripts/build_all_and_run.sh +++ b/scripts/build_all_and_run.sh @@ -1,4 +1,8 @@ #!/bin/bash + +# set the latest pre-commit script +cp -u scripts/pre-commit.sample .git/hooks/pre-commit + cd neveko-auth && cargo build cd ../neveko-contact && cargo build cd ../neveko-core && cargo build diff --git a/scripts/check_all.sh b/scripts/check_all.sh new file mode 100755 index 0000000..34a97c9 --- /dev/null +++ b/scripts/check_all.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Run from the neveko root +cd neveko-auth && cargo check +cd ../neveko-contact && cargo check +cd ../neveko-core && cargo check +cd ../neveko-gui && cargo check +cd ../neveko-market && cargo check +cd ../neveko-message && cargo check +cd ../ && cargo check + diff --git a/scripts/pre-commit.sample b/scripts/pre-commit.sample new file mode 100755 index 0000000..47ea91e --- /dev/null +++ b/scripts/pre-commit.sample @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# Run the formatter and linter before commits + +# If any command fails exit immediately with that code +set -eo pipefail + +# Check source without compiling +./scripts/check_all.sh +echo "source code checks passed" + +# Run the formatter +./scripts/fmtall.sh +echo "source code formatting complete"