Skip to content

Commit

Permalink
Maintenance (#126)
Browse files Browse the repository at this point in the history
* Update dependencies

* Add Git hooks

* Apply formatting rules

* Remove unused files

* Update README

* Update .gitignore
  • Loading branch information
noeddl committed May 20, 2024
1 parent 563a22c commit c273e56
Show file tree
Hide file tree
Showing 20 changed files with 259 additions and 94 deletions.
17 changes: 17 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -e

echo 'Run clippy ...'
# Make cargo clippy fail on warnings by setting `-D warnings`
cargo clippy -- -D warnings

echo 'Run rustfmt ...'

RUSTFMT_CONFIG="group_imports=StdExternalCrate,imports_granularity=Crate"

# Apply formatting to modified Rust files and stage them
for rust_file in $(git diff --name-only --staged | grep ".*\.rs$"); do
rustfmt +nightly --config $RUSTFMT_CONFIG $rust_file
git add $rust_file
done
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
# End of https://www.gitignore.io/api/rust

*.sublime-workspace
.vscode
notes.md
.DS_Store
6 changes: 0 additions & 6 deletions .pre-commit-config.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

211 changes: 179 additions & 32 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ rust-version = "1.74"

[dependencies]
clap = {version = "4.3", features = ["derive"] }
itertools = "0.10"
itertools = "0.13"
lazy_static = "1.4"
petgraph = "0.6"
thiserror = "1.0.58"

[dev-dependencies]
assert_cmd = "2.0"
indoc = "1.0"
predicates = "2"
rstest = "0.12"
indoc = "2.0"
predicates = "3.1"
rstest = "0.19"
Loading

0 comments on commit c273e56

Please sign in to comment.