fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
75bba7b5
patching
1load ( 2"@rules_rust//rust:defs.bzl" , 3"rust_binary" , 4"rust_clippy" , 5"rust_library" , 6"rust_proc_macro" , 7"rust_shared_library" , 8"rust_static_library" , 9"rust_test" , 10) 11 12package ( default_visibility = [ "//test:__subpackages__" ]) 13 14# Declaration of passing targets. 15 16rust_binary ( 17name = "ok_binary" , 18srcs = [ "src/main.rs" ], 19edition = "2018" , 20) 21 22rust_library ( 23name = "ok_library" , 24srcs = [ "src/lib.rs" ], 25edition = "2018" , 26) 27 28rust_shared_library ( 29name = "ok_shared_library" , 30srcs = [ "src/lib.rs" ], 31edition = "2018" , 32) 33 34rust_static_library ( 35name = "ok_static_library" , 36srcs = [ "src/lib.rs" ], 37edition = "2018" , 38) 39 40rust_test ( 41name = "ok_test" , 42srcs = [ "src/lib.rs" ], 43edition = "2018" , 44) 45 46rust_proc_macro ( 47name = "ok_proc_macro" , 48srcs = [ "src/proc_macro.rs" ], 49edition = "2018" , 50) 51 52# Clippy analysis of passing targets. 53 54rust_clippy ( 55name = "ok_binary_clippy" , 56deps = [ ":ok_binary" ], 57) 58 59rust_clippy ( 60name = "ok_library_clippy" , 61deps = [ ":ok_library" ], 62) 63 64rust_clippy ( 65name = "ok_shared_library_clippy" , 66deps = [ ":ok_shared_library" ], 67) 68 69rust_clippy ( 70name = "ok_static_library_clippy" , 71deps = [ ":ok_static_library" ], 72) 73 74rust_clippy ( 75name = "ok_test_clippy" , 76testonly = True , 77deps = [ ":ok_test" ], 78) 79 80rust_clippy ( 81name = "ok_proc_macro_clippy" , 82deps = [ ":ok_proc_macro" ], 83) 84 85# Declaration of failing targets. 86 87rust_binary ( 88name = "bad_binary" , 89srcs = [ "bad_src/main.rs" ], 90edition = "2018" , 91tags = [ "noclippy" ], 92) 93 94rust_library ( 95name = "bad_library" , 96srcs = [ "bad_src/lib.rs" ], 97edition = "2018" , 98tags = [ "noclippy" ], 99) 100 101rust_library ( 102name = "bad_shared_library" , 103srcs = [ "bad_src/lib.rs" ], 104edition = "2018" , 105tags = [ "noclippy" ], 106) 107 108rust_library ( 109name = "bad_static_library" , 110srcs = [ "bad_src/lib.rs" ], 111edition = "2018" , 112tags = [ "noclippy" ], 113) 114 115rust_test ( 116name = "bad_test" , 117srcs = [ "bad_src/lib.rs" ], 118edition = "2018" , 119tags = [ "noclippy" ], 120) 121 122rust_proc_macro ( 123name = "bad_proc_macro" , 124srcs = [ "bad_src/proc_macro.rs" ], 125edition = "2018" , 126tags = [ "noclippy" ], 127) 128 129# Clippy analysis of failing targets. 130 131rust_clippy ( 132name = "bad_binary_clippy" , 133tags = [ "manual" ], 134deps = [ ":bad_binary" ], 135) 136 137rust_clippy ( 138name = "bad_library_clippy" , 139tags = [ "manual" ], 140deps = [ ":bad_library" ], 141) 142 143rust_clippy ( 144name = "bad_shared_library_clippy" , 145tags = [ "manual" ], 146deps = [ ":bad_shared_library" ], 147) 148 149rust_clippy ( 150name = "bad_static_library_clippy" , 151tags = [ "manual" ], 152deps = [ ":bad_static_library" ], 153) 154 155rust_clippy ( 156name = "bad_test_clippy" , 157testonly = True , 158tags = [ "manual" ], 159deps = [ ":bad_test" ], 160) 161 162rust_clippy ( 163name = "bad_proc_macro_clippy" , 164tags = [ "manual" ], 165deps = [ ":bad_proc_macro" ], 166) 167 168sh_binary ( 169name = "clippy_failure_test" , 170srcs = [ "clippy_failure_test.sh" ], 171)