Open makingthematrix opened 6 years ago
rustfmt for syntax checks: http://fredrik.anderzon.se/2017/01/31/rust-code-style-and-rustfmt-2/
Clippy for various additional lint checks: https://github.com/rust-lang-nursery/rust-clippy Works only with the nightly build (?). Maybe I could use it as a subcommand for cargo.
Remember to add /usr/local/lib
to your LD_LIBRARY_PATH
(or include it in your /etc/ld.so.conf
so ldconfig
searches it when run)
in order to prevent:
~/.cargo/bin/clippy-driver: error while loading shared libraries: librustc_driver-2afd8b7b2eb0a674.so: cannot open shared object file: No such file or directory
Found here: https://github.com/rust-lang/rust/issues/24677
If it still does not work, just reinstall clippy:
cargo +nightly install clippy -f
And if that doesn't work (there were some problems with it recently, check https://github.com/rust-lang-nursery/rust-clippy/issues/2704 and https://github.com/rust-lang-nursery/rust-clippy/issues/2706) you can try this:
cargo update
cargo install clippy --git https://github.com/rust-lang-nursery/rust-clippy.git
Until now every time I started to work with a new environment, I ignored this part. I learned only a few most important command: some kind of
compile
andtest
mostly, nad thought it was sufficient. Well, it was, but it also meant that as the project became larger, the more I had to do by hand. It was tedious, consumed time, and eventually I started ignoring these tasks. And as a result the project was getting more and more messy.Let's try not to repeat the error. I still don't like Docker and I'm not going to use it here, but it would be nice to learn
cargo
and probably to installcargo-make
and learn that to. Let's start handling all these pesky little tasks properly from the very beginning: