fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
bab14a47
0.6.0
1load ( "@rules_rust//rust:defs.bzl" , "rust_binary" , "rust_clippy" , "rust_library" , "rust_test" ) 2 3package ( default_visibility = [ "//test:__subpackages__" ]) 4 5# Declaration of passing targets. 6 7rust_binary ( 8name = "ok_binary" , 9srcs = [ "src/main.rs" ], 10edition = "2018" , 11) 12 13rust_library ( 14name = "ok_library" , 15srcs = [ "src/lib.rs" ], 16edition = "2018" , 17) 18 19rust_test ( 20name = "ok_test" , 21srcs = [ "src/lib.rs" ], 22edition = "2018" , 23) 24 25# Clippy analysis of passing targets. 26 27rust_clippy ( 28name = "ok_binary_clippy" , 29deps = [ ":ok_binary" ], 30) 31 32rust_clippy ( 33name = "ok_library_clippy" , 34deps = [ ":ok_library" ], 35) 36 37rust_clippy ( 38name = "ok_test_clippy" , 39testonly = True , 40deps = [ ":ok_test" ], 41) 42 43# Declaration of failing targets. 44 45rust_binary ( 46name = "bad_binary" , 47srcs = [ "bad_src/main.rs" ], 48edition = "2018" , 49tags = [ "noclippy" ], 50) 51 52rust_library ( 53name = "bad_library" , 54srcs = [ "bad_src/lib.rs" ], 55edition = "2018" , 56tags = [ "noclippy" ], 57) 58 59rust_test ( 60name = "bad_test" , 61srcs = [ "bad_src/lib.rs" ], 62edition = "2018" , 63tags = [ "noclippy" ], 64) 65 66# Clippy analysis of failing targets. 67 68rust_clippy ( 69name = "bad_binary_clippy" , 70tags = [ "manual" ], 71deps = [ ":bad_binary" ], 72) 73 74rust_clippy ( 75name = "bad_library_clippy" , 76tags = [ "manual" ], 77deps = [ ":bad_library" ], 78) 79 80rust_clippy ( 81name = "bad_test_clippy" , 82testonly = True , 83tags = [ "manual" ], 84deps = [ ":bad_test" ], 85) 86 87sh_binary ( 88name = "clippy_failure_test" , 89srcs = [ "clippy_failure_test.sh" ], 90)