Skip to content

Commit

Permalink
Feat garde 0.16 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Romain Lebran committed Dec 1, 2023
2 parents 44b4459 + e078e57 commit d6909d4
Show file tree
Hide file tree
Showing 7 changed files with 156 additions and 201 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,14 @@ jobs:
rustup component add rustfmt
cargo fmt --all --check
- name: Check cranky
- name: Check clippy
run: |
rustup component add clippy
cargo install cargo-cranky --force
cargo cranky --no-deps --all-features --tests -- -D warnings -D clippy::print_stdout
cargo clippy --no-deps --all-features --tests -- -D warnings
- name: Check deny
run: |
cargo install cargo-deny --force
cargo deny check licenses sources advisories
- uses: EmbarkStudios/cargo-deny-action@v1
with:
commande: check licenses sources advisories

- name: Run tests
run: cargo test --all-features
134 changes: 132 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Actix-web garde wrapper"
readme = "README.md"
keywords = ["garde", "actix", "actix-web", "validation"]
categories = ["web-programming"]
version = "0.2.0"
version = "0.3.0"

authors = ["Netwo <oss@netwo.com>"]
edition = "2021"
Expand All @@ -19,7 +19,7 @@ actix-router = "0.5"
actix-web = "4"
derive_more = "0.99"
futures = "0.3"
garde = "0.15"
garde = "0.16"
log = "0.4"
mime = "0.3"
pin-project-lite = "0.2"
Expand All @@ -32,3 +32,133 @@ serde_qs = { version = "0.12", optional = true }
[dev-dependencies]
actix-test = "0.1"
tokio = { version = "1", features = ["macros"], default-features = false }

[lints.rust]
unsafe_code = "forbid"
macro_use_extern_crate = "warn"
non-ascii-idents = "warn"
noop_method_call = "warn"
unreachable_pub = "warn"
unused_crate_dependencies = "warn"
unused_import_braces = "warn"
unused-lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
unused_tuple_struct_fields = "warn"

[lints.clippy]
bool_to_int_with_if = "warn"
branches_sharing_code = "warn"
case_sensitive_file_extension_comparisons = "warn"
checked_conversions = "warn"
cloned_instead_of_copied = "warn"
copy_iterator = "warn"
create_dir = "warn"
dbg_macro = "warn"
debug_assert_with_mut_call = "warn"
derive_partial_eq_without_eq = "warn"
doc_link_with_quotes = "warn"
doc_markdown = "warn"
empty_drop = "warn"
empty_line_after_outer_attr = "warn"
enum_glob_use = "warn"
equatable_if_let = "warn"
exit = "warn"
expect_used = "warn"
expl_impl_clone_on_copy = "warn"
explicit_deref_methods = "warn"
explicit_into_iter_loop = "warn"
explicit_iter_loop = "warn"
fallible_impl_from = "warn"
filetype_is_file = "warn"
filter_map_next = "warn"
flat_map_option = "warn"
float_cmp = "warn"
float_cmp_const = "warn"
fn_params_excessive_bools = "warn"
fn_to_numeric_cast_any = "warn"
from_iter_instead_of_collect = "warn"
implicit_clone = "warn"
inefficient_to_string = "warn"
invalid_upcast_comparisons = "warn"
items_after_statements = "warn"
iter_not_returning_iterator = "warn"
iter_on_empty_collections = "warn"
iter_on_single_items = "warn"
iter_with_drain = "warn"
large_digit_groups = "warn"
large_include_file = "warn"
large_stack_arrays = "warn"
large_types_passed_by_value = "warn"
linkedlist = "warn"
lossy_float_literal = "warn"
macro_use_imports = "warn"
manual_assert = "warn"
manual_clamp = "warn"
manual_instant_elapsed = "warn"
manual_let_else = "warn"
manual_ok_or = "warn"
many_single_char_names = "warn"
match_bool = "warn"
match_on_vec_items = "warn"
match_wild_err_arm = "warn"
match_wildcard_for_single_variants = "warn"
maybe_infinite_iter = "warn"
mem_forget = "warn"
mismatching_type_param_order = "warn"
mixed_read_write_in_expression = "warn"
mut_mut = "warn"
mutex_atomic = "warn"
mutex_integer = "warn"
needless_bitwise_bool = "warn"
needless_collect = "warn"
needless_continue = "warn"
needless_for_each = "warn"
needless_pass_by_value = "warn"
negative_feature_names = "warn"
no_effect_underscore_binding = "warn"
nonstandard_macro_braces = "warn"
option_option = "warn"
or_fun_call = "warn"
panic = "warn"
path_buf_push_overwrite = "warn"
print_stderr = "warn"
print_stdout = "warn"
range_minus_one = "warn"
range_plus_one = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_feature_names = "warn"
ref_binding_to_reference = "warn"
rest_pat_in_fully_bound_structs = "warn"
same_functions_in_if_condition = "warn"
same_name_method = "warn"
significant_drop_in_scrutinee = "warn"
string_slice = "warn"
suspicious_operation_groupings = "warn"
suspicious_xor_used_as_pow = "warn"
todo = "warn"
trailing_empty_array = "warn"
trait_duplication_in_bounds = "warn"
try_err = "warn"
type_repetition_in_bounds = "warn"
unchecked_duration_subtraction = "warn"
unicode_not_nfc = "warn"
unimplemented = "warn"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
unnecessary_wraps = "warn"
unnested_or_patterns = "warn"
unreadable_literal = "warn"
unsafe_derive_deserialize = "warn"
unused_async = "warn"
unused_peekable = "warn"
unused_rounding = "warn"
unused_self = "warn"
unwrap_in_result = "warn"
unwrap_used = "warn"
useless_let_if_seq = "warn"
verbose_file_reads = "warn"
wildcard_dependencies = "warn"
wildcard_imports = "warn"
zero_sized_map_values = "warn"
187 changes: 0 additions & 187 deletions Cranky.toml

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Actix-web wrapper for [garde](https://github.com/jprochazk/garde), a Rust valida

```toml
[dependencies]
garde = "0.14"
garde-actix-web = "0.1.0"
garde = "0.16"
garde-actix-web = "0.3.0"
```

### Usage example
Expand Down Expand Up @@ -69,6 +69,7 @@ Context needs to be provided through actix's `data` or `app_data`, if not found
|---------------|-------------------------|
| `0.14` | `0.1.x` |
| `0.15` | `0.2.x` |
| `0.16` | `0.3.x` |


### About us
Expand Down
5 changes: 5 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
too-many-arguments-threshold = 10
allow-expect-in-tests = true
allow-unwrap-in-tests = true
avoid-breaking-exported-api = true
allow-print-in-tests = false
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.72.0
1.74.0
Loading

0 comments on commit d6909d4

Please sign in to comment.