Skip to content

Commit

Permalink
🍕 Add new changes to QoL and UI output
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Fitz Abucay <ffimnsr@gmail.com>
  • Loading branch information
ffimnsr committed Jan 3, 2025
1 parent 1881d4f commit e37c79c
Show file tree
Hide file tree
Showing 48 changed files with 1,137 additions and 1,124 deletions.
9 changes: 6 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.rs]
indent_size = 2

[*.yaml]
indent_size = 2

Expand Down
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
RUST_LOG=info
DATABASE_URL=postgres://postgres:mysecretpassword@localhost:5432/test_migration
DATABASE_URL=postgres://postgres:postgres@localhost:5432/test_migration
MIGRATIONS_ROOT=sample_migrations
14 changes: 14 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,17 @@ if [ $? -ne 0 ]; then
echo >&2 "Please fix the errors before committing."
exit 1
fi

echo "Checking if the code is formatted"
cargo fmt --all --check
if [ $? -ne 0 ]; then
echo >&2 "Please run 'cargo fmt' and commit the formatting changes."
exit 1
fi

echo "Checking for code warnings"
cargo clippy --all-features --all-targets --tests --benches -- -Dclippy::all
if [ $? -ne 0 ]; then
echo >&2 "Please run 'cargo clippy' and fix the warnings."
exit 1
fi
39 changes: 11 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "midas"
version = "0.7.1"
version = "0.7.2"
authors = ["Edward Fitz Abucay <gh:@ffimnsr>"]
edition = "2021"
readme = "README.md"
Expand Down Expand Up @@ -43,11 +43,10 @@ prettytable-rs = "0.10.0"
thiserror = "2.0.3"
anyhow = "1.0.93"
indicatif = "0.17.9"
indicatif-log-bridge = "0.2.3"
nom = "7.1.3"
serde = { version = "1.0.215", features = ["derive"] }
serde_yaml = "0.9.34"
rand = "0.8.5"
console = "0.15.10"

[dev-dependencies]
tempfile = "3.12"
Expand Down
133 changes: 0 additions & 133 deletions Makefile.toml

This file was deleted.

5 changes: 5 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
disallowed-methods = [
{ path = "std::path::Path::display", reason = "incorrect handling of non-Unicode paths, use path.to_utf8() or debug (`{path:?}`) instead" },
]
allow-unwrap-in-tests = true
msrv = "1.77.2"
46 changes: 23 additions & 23 deletions midas-rs.code-workspace
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true,
"packages": true
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.trigger": true,
"target": true,
"packages": true
}
"folders": [
{
"path": "."
}
],
"settings": {
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true,
"packages": true
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.trigger": true,
"target": true,
"packages": true
}
}
}
6 changes: 0 additions & 6 deletions migrations/0000000000000_initial.sql

This file was deleted.

17 changes: 15 additions & 2 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
max_width = 79
use_small_heuristics = "Max"
edition = "2021"
fn_params_layout = "Tall"
hard_tabs = false
match_block_trailing_comma = true
max_width = 110
merge_derives = true
newline_style = "Unix"
remove_nested_parens = true
reorder_imports = true
reorder_modules = true
tab_spaces = 2
use_field_init_shorthand = true
use_small_heuristics = "Default"
imports_layout = "Vertical"
imports_granularity = "Module"
6 changes: 6 additions & 0 deletions sample_migrations/0000000000000_initial.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- # Put the your SQL below migration seperator.
-- !UP
-- CREATE TABLE IF NOT EXISTS users (id SERIAL PRIMARY KEY);

-- !DOWN
-- DROP TABLE users;
Loading

0 comments on commit e37c79c

Please sign in to comment.