Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could put all this stuff in a parent POM and re-use it for all your projects.

Statements like "just 2 lines" in Cargo is just a weird comparison. Because it's only 2 lines if you don't configure anything. You can also use all this stuff out of the box with Maven or Gradle with far fewer lines if you don't configure anything. I can point out a whole slew of weird defaults in Clippy [1] which will probably require me to specify a dozen of the hundreds [2] of configuration options it has.

> 0. It's built in. Cargo check runs by default, you can run cargo clippy with 1 line if you want stricter checks.

Findbugs is a framework for static code analysis with plugin support and what not. Clippy is just a linter.

[1] https://rust-lang.github.io/rust-clippy/master/index.html [2] https://doc.rust-lang.org/clippy/lint_configuration.html



The world has moved on though to opinionated tools, and Rust isn't even the furthest in that direction (That would be Go). The equivalent of those two lines in Cargo.toml would be this example of a basic configuration from the jacoco-maven-plugin: https://www.jacoco.org/jacoco/trunk/doc/examples/build/pom.x... - That's 40 lines in the <plugin> section to do the "defaults".

Yes, you could add a load of config for files to include/exclude from coverage and so on, but the idea that that's a norm is way more common in Java projects than other languages. Like here's some example Cargo.toml files from complicated Rust projects:

Servo: https://github.com/servo/servo/blob/main/Cargo.toml

rust-gdext: https://github.com/godot-rust/gdext/blob/master/godot-core/C...

ripgrep: https://github.com/BurntSushi/ripgrep/blob/master/Cargo.toml

socketio: https://github.com/1c3t3a/rust-socketio/blob/main/socketio/C...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: