60 lines
1.3 KiB
Python
60 lines
1.3 KiB
Python
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library", "rust_test")
|
|
|
|
rust_library(
|
|
name = "natu_lib",
|
|
crate_name = "natu",
|
|
srcs = [
|
|
"ast.rs",
|
|
"file_store.rs",
|
|
"natu.rs",
|
|
"parser.rs",
|
|
"rules.rs",
|
|
"rules/let_order.rs",
|
|
"rules/list_to_attrs_map.rs",
|
|
"rules/manual_inherit.rs",
|
|
"rules/manual_inherit_from.rs",
|
|
"rules/redundant_parameter_forwarding.rs",
|
|
"rules/single_use_binding.rs",
|
|
"rules/unquoted_uri.rs",
|
|
"scope_graph.rs",
|
|
],
|
|
deps = [
|
|
"//src/status:status",
|
|
"//third_party/crates:rnix",
|
|
"//third_party/crates/rowan-0.16.1:rowan",
|
|
],
|
|
)
|
|
|
|
rust_test(
|
|
name = "file_store_test",
|
|
srcs = ["file_store_test.rs"],
|
|
deps = [":natu_lib"],
|
|
)
|
|
|
|
rust_test(
|
|
name = "natu_test",
|
|
srcs = ["natu_test.rs"],
|
|
data = [
|
|
"testdata/clean.nix",
|
|
"testdata/invalid.nix",
|
|
"testdata/lint_findings.nix",
|
|
],
|
|
deps = [
|
|
":natu_lib",
|
|
"//src/status:status",
|
|
"//third_party/crates:googletest",
|
|
],
|
|
)
|
|
|
|
rust_binary(
|
|
name = "natu",
|
|
crate_name = "natu_cli",
|
|
srcs = ["natu_main.rs"],
|
|
deps = [
|
|
":natu_lib",
|
|
"//src/monorepo:monorepo",
|
|
"//src/status:status",
|
|
"//third_party/crates:clap",
|
|
],
|
|
)
|