# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.89"
name = "cedar-policy-formatter"
version = "4.9.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Policy formatter for the Cedar Policy Language."
homepage = "https://cedarpolicy.com"
readme = "README.md"
keywords = [
    "cedar",
    "authorization",
    "policy",
    "security",
]
categories = [
    "compilers",
    "config",
]
license = "Apache-2.0"
repository = "https://github.com/cedar-policy/cedar"

[features]
experimental = ["tolerant-ast"]
tolerant-ast = ["cedar-policy-core/tolerant-ast"]

[lib]
name = "cedar_policy_formatter"
path = "src/lib.rs"

[dependencies.cedar-policy-core]
version = "=4.9.0"

[dependencies.itertools]
version = "0.14"

[dependencies.logos]
version = "0.16.0"

[dependencies.miette]
version = "7.6.0"

[dependencies.pretty]
version = "0.12.5"

[dependencies.regex]
version = "1.12.2"
features = ["unicode"]

[dependencies.smol_str]
version = "0.3"
features = ["serde"]

[dev-dependencies.insta]
version = "1.46.1"
features = ["glob"]

[lints.clippy]
allow_attributes = "deny"
allow_attributes_without_reason = "deny"
cast_lossless = "warn"
cast_possible_truncation = "warn"
cloned_instead_of_copied = "warn"
expect_used = "deny"
fallible_impl_from = "deny"
format_collect = "warn"
format_push_string = "warn"
implicit_clone = "warn"
inconsistent_struct_constructor = "warn"
indexing_slicing = "deny"
inefficient_to_string = "warn"
large_enum_variant = "allow"
large_types_passed_by_value = "warn"
missing_const_for_fn = "allow"
needless_doctest_main = "allow"
needless_pass_by_value = "warn"
option_as_ref_cloned = "warn"
option_if_let_else = "allow"
option_option = "warn"
panic = "deny"
redundant_clone = "deny"
redundant_pub_crate = "allow"
ref_option = "warn"
ref_option_ref = "warn"
result_large_err = "allow"
should_panic_without_expect = "deny"
string_slice = "deny"
todo = "deny"
too_long_first_doc_paragraph = "allow"
trivially_copy_pass_by_ref = "warn"
unimplemented = "deny"
unreachable = "deny"
unwrap_used = "deny"
use_self = "allow"

[lints.clippy.nursery]
level = "warn"
priority = -1

[lints.rust]
missing_debug_implementations = "deny"
rust-2018-idioms = "deny"
unsafe_code = "forbid"
unused_assignments = "allow"

[lints.rust.unexpected_cfgs]
level = "deny"
priority = 0
check-cfg = [
    "cfg(kani)",
    "cfg(fuzzing)",
]
