File tree Expand file tree Collapse file tree 14 files changed +70
-70
lines changed
Expand file tree Collapse file tree 14 files changed +70
-70
lines changed Original file line number Diff line number Diff line change @@ -3,34 +3,8 @@ set -eou pipefail
33
44
55function job_lint() {
6- set -x
7-
8- # Get zero-terminated list of non-symlink files (reusable)
9- git_ls_files=" $( git ls-files -z | while IFS= read -r -d ' ' file; do
10- [ ! -L " $file " ] && printf ' %s\0' " $file "
11- done)"
12-
13- selfci step start " check leftover dbg! "
14- while IFS= read -r -d '' path; do
15- if grep -q 'dbg!(' " $path " ; then
16- >&2 echo " $path contains dbg! macro"
17- selfci step fail
18- fi
19- done <<< " $git_ls_files "
20-
21- selfci step start " nixfmt"
22- nix_files=()
23- while IFS= read -r -d '' path; do
24- [[ " $path " == *.nix ]] && nix_files+=(" $path " )
25- done <<< " $git_ls_files "
26- if [ ${# nix_files[@]} -gt 0 ]; then
27- if ! nixfmt -c " ${nix_files[@]} " ; then
28- selfci step fail
29- fi
30- fi
31-
32- selfci step start " cargo fmt"
33- if ! cargo fmt --all --check ; then
6+ selfci step start " treefmt"
7+ if ! treefmt --ci ; then
348 selfci step fail
359 fi
3610}
Original file line number Diff line number Diff line change 1+ [formatter .nix ]
2+ command = " nixfmt"
3+ includes = [" *.nix" ]
4+
5+ [formatter .rust ]
6+ command = " rustfmt"
7+ options = [" --edition" , " 2024" ]
8+ includes = [" *.rs" ]
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ description = "A p2p (f2f) social network."
2626[workspace .lints .clippy ]
2727collapsible_if = " allow"
2828collapsible_else_if = " allow"
29+ dbg_macro = " deny"
30+ literal_string_with_formatting_args = " deny"
2931
3032[workspace .metadata ]
3133name = " rostra"
Original file line number Diff line number Diff line change @@ -50,3 +50,6 @@ divan = { workspace = true }
5050test-log = { workspace = true , features = [" trace" ] }
5151serde_json = { workspace = true }
5252tracing = { workspace = true }
53+
54+ [lints ]
55+ workspace = true
Original file line number Diff line number Diff line change @@ -14,3 +14,6 @@ snafu = { workspace = true }
1414tokio = { workspace = true }
1515tracing = { workspace = true }
1616tracing-subscriber = { workspace = true }
17+
18+ [lints ]
19+ workspace = true
Original file line number Diff line number Diff line change @@ -23,3 +23,6 @@ snafu = { workspace = true }
2323tokio = { workspace = true }
2424tracing = { workspace = true }
2525tracing-subscriber = { workspace = true }
26+
27+ [lints ]
28+ workspace = true
Original file line number Diff line number Diff line change @@ -4,5 +4,8 @@ version.workspace = true
44edition.workspace = true
55license.workspace = true
66
7+ [lints ]
8+ workspace = true
9+
710[dependencies ]
811serde = { workspace = true , features = [" derive" ] }
Original file line number Diff line number Diff line change @@ -15,3 +15,6 @@ tokio = { workspace = true }
1515
1616[dev-dependencies ]
1717test-log = { workspace = true , features = [" trace" ] }
18+
19+ [lints ]
20+ workspace = true
Original file line number Diff line number Diff line change @@ -9,5 +9,8 @@ version = { workspace = true }
99[features ]
1010default = []
1111
12+ [lints ]
13+ workspace = true
14+
1215[dependencies ]
1316snafu = { workspace = true }
Original file line number Diff line number Diff line change @@ -9,4 +9,7 @@ version = { workspace = true }
99[features ]
1010default = []
1111
12+ [lints ]
13+ workspace = true
14+
1215[dependencies ]
You can’t perform that action at this time.
0 commit comments