Skip to content

Commit

Permalink
Use clippy instead of cargo check
Browse files Browse the repository at this point in the history
  • Loading branch information
esdmr committed Jul 27, 2024
1 parent 07888c9 commit 1523cc3
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
toolchain: stable
targets: wasm32-unknown-unknown

- name: Cargo check
run: cargo check
- name: Run clippy
run: cargo clippy --no-deps -- -Dwarnings
working-directory: eval-wasm

- name: Cargo fmt
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
toolchain: stable
targets: wasm32-unknown-unknown

- name: Cargo check
run: cargo check
- name: Run clippy
run: cargo clippy --no-deps -- -Dwarnings
working-directory: eval-wasm

- name: Cargo fmt
Expand Down
129 changes: 129 additions & 0 deletions eval-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,132 @@ debug-assertions = false

[package.metadata.wasm-pack.profile.dev.wasm-bindgen]
dwarf-debug-info = true

[lints.clippy]
all = "warn"
pedantic = "warn"
nursery = "warn"

# Warn Cargo:
multiple_crate_versions = "warn"
negative_feature_names = "warn"
redundant_feature_names = "warn"
wildcard_dependencies = "warn"

# Warn Restricted:
absolute_paths = "warn"
alloc_instead_of_core = "warn"
assertions_on_result_states = "warn"
big_endian_bytes = "warn"
clone_on_ref_ptr = "warn"
dbg_macro = "warn"
decimal_literal_representation = "warn"
default_numeric_fallback = "warn"
default_union_representation = "warn"
deref_by_slicing = "warn"
empty_drop = "warn"
empty_enum_variants_with_brackets = "warn"
empty_structs_with_brackets = "warn"
error_impl_error = "warn"
exhaustive_enums = "warn"
exhaustive_structs = "warn"
exit = "warn"
expect_used = "warn"
filetype_is_file = "warn"
float_arithmetic = "warn"
float_cmp_const = "warn"
fn_to_numeric_cast_any = "warn"
format_push_string = "warn"
get_unwrap = "warn"
host_endian_bytes = "warn"
if_then_some_else_none = "warn"
infinite_loop = "warn"
integer_division = "warn"
iter_over_hash_type = "warn"
large_include_file = "warn"
let_underscore_must_use = "warn"
lossy_float_literal = "warn"
map_err_ignore = "warn"
mem_forget = "warn"
min_ident_chars = "warn"
missing_assert_message = "warn"
missing_asserts_for_indexing = "warn"
mixed_read_write_in_expression = "warn"
modulo_arithmetic = "warn"
multiple_inherent_impl = "warn"
multiple_unsafe_ops_per_block = "warn"
mutex_atomic = "warn"
needless_raw_strings = "warn"
panic = "warn"
panic_in_result_fn = "warn"
partial_pub_fields = "warn"
pattern_type_mismatch = "warn"
print_stderr = "warn"
print_stdout = "warn"
pub_without_shorthand = "warn"
question_mark_used = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_type_annotations = "warn"
ref_patterns = "warn"
rest_pat_in_fully_bound_structs = "warn"
same_name_method = "warn"
semicolon_inside_block = "warn"
single_char_lifetime_names = "warn"
std_instead_of_alloc = "warn"
std_instead_of_core = "warn"
str_to_string = "warn"
string_add = "warn"
string_lit_chars_any = "warn"
string_slice = "warn"
string_to_string = "warn"
suspicious_xor_used_as_pow = "warn"
tests_outside_test_module = "warn"
todo = "warn"
try_err = "warn"
undocumented_unsafe_blocks = "warn"
unimplemented = "warn"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
unnecessary_self_imports = "warn"
unneeded_field_pattern = "warn"
unreachable = "warn"
unseparated_literal_suffix = "warn"
unwrap_in_result = "warn"
unwrap_used = "warn"
use_debug = "warn"
wildcard_enum_match_arm = "warn"

# Allow Cargo:

cargo_common_metadata = "allow"

# Allow Restricted:
allow_attributes = "allow"
allow_attributes_without_reason = "allow"
arithmetic_side_effects = "allow"
as_conversions = "allow"
as_underscore = "allow"
disallowed_script_idents = "allow"
else_if_without_else = "allow"
impl_trait_in_params = "allow"
implicit_return = "allow"
indexing_slicing = "allow"
inline_asm_x86_att_syntax = "allow"
inline_asm_x86_intel_syntax = "allow"
let_underscore_untyped = "allow"
little_endian_bytes = "allow"
missing_docs_in_private_items = "allow"
missing_inline_in_public_items = "allow"
missing_trait_methods = "allow"
mod_module_files = "allow"
non_ascii_literal = "allow"
pub_use = "allow"
pub_with_shorthand = "allow"
self_named_module_files = "allow"
semicolon_outside_block = "allow"
separated_literal_suffix = "allow"
shadow_reuse = "allow"
shadow_same = "allow"
shadow_unrelated = "allow"
single_call_fn = "allow"

0 comments on commit 1523cc3

Please sign in to comment.