[package]
edition = "2024"
rust-version = "1.85"
name = "guardrail3"
version = "0.2.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Composable code guardrails for Rust and TypeScript projects"
readme = "README.md"
keywords = [
"guardrails",
"linting",
"clippy",
"rust",
"typescript",
]
categories = [
"development-tools",
"command-line-utilities",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/websmasher/guardrail3"
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ target }{ archive-suffix }"
bin-dir = "{ bin }{ binary-ext }"
pkg-fmt = "tgz"
[lib]
name = "guardrail3"
path = "src/lib.rs"
[[bin]]
name = "guardrail3"
path = "src/main.rs"
[[test]]
name = "adversarial_config_tests"
path = "tests/adversarial_config_tests.rs"
[[test]]
name = "adversarial_fixtures"
path = "tests/adversarial_fixtures.rs"
[[test]]
name = "adversarial_grep_attacks"
path = "tests/adversarial_grep_attacks.rs"
[[test]]
name = "cli_tests"
path = "tests/cli_tests.rs"
[[test]]
name = "property_tests"
path = "tests/property_tests.rs"
[dependencies.clap]
version = "4"
features = ["derive"]
[dependencies.colored]
version = "2"
[dependencies.glob]
version = "0.3"
[dependencies.proc-macro2]
version = "1"
features = ["span-locations"]
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.syn]
version = "2"
features = [
"full",
"parsing",
"visit",
]
[dependencies.toml]
version = "0.8"
[dependencies.tree-sitter]
version = "0.26"
[dependencies.tree-sitter-typescript]
version = "0.23"
[dependencies.walkdir]
version = "2"
[dev-dependencies.proptest]
version = "1"
[dev-dependencies.tempfile]
version = "3"
[lints.clippy]
arithmetic_side_effects = "deny"
as_conversions = "deny"
dbg_macro = "deny"
disallowed_methods = "deny"
disallowed_types = "deny"
empty_line_after_doc_comments = "allow"
expect_used = "deny"
float_cmp = "deny"
implicit_clone = "deny"
indexing_slicing = "deny"
large_futures = "deny"
large_stack_arrays = "deny"
lossy_float_literal = "deny"
map_unwrap_or = "deny"
missing_assert_message = "deny"
missing_docs_in_private_items = "allow"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
must_use_candidate = "allow"
needless_pass_by_value = "deny"
option_if_let_else = "allow"
panic = "deny"
partial_pub_fields = "deny"
print_stderr = "deny"
print_stdout = "deny"
redundant_closure_for_method_calls = "deny"
redundant_else = "deny"
ref_option_ref = "allow"
rest_pat_in_fully_bound_structs = "deny"
semicolon_if_nothing_returned = "deny"
shadow_unrelated = "deny"
single_match_else = "allow"
str_to_string = "deny"
string_slice = "deny"
todo = "deny"
trivially_copy_pass_by_ref = "allow"
unimplemented = "deny"
unwrap_used = "deny"
verbose_file_reads = "deny"
wildcard_enum_match_arm = "deny"
[lints.clippy.all]
level = "deny"
priority = -1
[lints.clippy.cargo]
level = "deny"
priority = -1
[lints.clippy.nursery]
level = "deny"
priority = -1
[lints.clippy.pedantic]
level = "deny"
priority = -1
[lints.rust]
dead_code = "deny"
unsafe_code = "forbid"
unused_crate_dependencies = "deny"
unused_results = "deny"
warnings = "deny"