lemmy/scripts/fix-clippy.sh
Charles Hall 4e5798852f
make shebangs posix compliant (#2974)
Previously, these scripts wouldn't work on exotic systems such as NixOS.

```
fd '\.sh$' -t f --exec sed -i 's@#!/bin/bash@#!/usr/bin/env bash@'
```
2023-06-08 15:38:26 -04:00

24 lines
814 B
Bash
Executable file

#!/usr/bin/env bash
set -e
CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
cd $CWD/../
cargo clippy --workspace --fix --allow-staged --allow-dirty --tests --all-targets --all-features -- \
-D warnings -D deprecated -D clippy::perf -D clippy::complexity \
-D clippy::style -D clippy::correctness -D clippy::suspicious \
-D clippy::dbg_macro -D clippy::inefficient_to_string \
-D clippy::items-after-statements -D clippy::implicit_clone \
-D clippy::wildcard_imports -D clippy::cast_lossless \
-D clippy::manual_string_new -D clippy::redundant_closure_for_method_calls \
-D clippy::unused_self \
-A clippy::uninlined_format_args \
-D clippy::get_first
cargo clippy --workspace --features console -- \
-D clippy::unwrap_used \
-D clippy::indexing_slicing
cargo +nightly fmt