You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The java_package! prucedural macro currently generates code on which clippy reports some warnings. For example:
$ cargo clippy --manifest-path=test-crates/Cargo.toml
warning: redundant field names in struct initialization
--> viper/src/lib.rs:78:5
|
78 | class CarbonVerifier {
| ^^^^^ help: replace it with: `a0`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default
warning: redundant field names in struct initialization
--> viper/src/lib.rs:78:5
|
78 | class CarbonVerifier {
| ^^^^^ help: replace it with: `a1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
warning: redundant field names in struct initialization
--> viper/src/lib.rs:46:5
|
46 | class Program {
| ^^^^^ help: replace it with: `a0`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
(...)
warning: this function has too many arguments (9/7)
--> viper/src/lib.rs:46:5
|
46 | class Program {
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
warning: `viper` (lib) generated 12 warnings
In general, it would be nice to fix or suppress these, so that users of the macro don't get warnings for Rust code which they didn't write.
The last clippy::too_many_arguments warning, in particular, correctly signals that a Java method has too many arguments. However, reporting it in the Rust crate that uses the method is incorrect. It should be responsibility of a Java linter (if one is used) to report the warning on the Java codebase.
The text was updated successfully, but these errors were encountered:
The
java_package!
prucedural macro currently generates code on which clippy reports some warnings. For example:In general, it would be nice to fix or suppress these, so that users of the macro don't get warnings for Rust code which they didn't write.
The last
clippy::too_many_arguments
warning, in particular, correctly signals that a Java method has too many arguments. However, reporting it in the Rust crate that uses the method is incorrect. It should be responsibility of a Java linter (if one is used) to report the warning on the Java codebase.The text was updated successfully, but these errors were encountered: