-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Actually satisfying a good chunk of these lints is deferred and they are in an `allow` block in `lib.rs`. Still, I did satisfy some of the lints. The `rand` method `gen` has to be a raw `r#gen` until they publish a new version. They have that method renamed in [`master`](https://github.com/rust-random/rand).
- Loading branch information
Showing
12 changed files
with
148 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# LINEBENDER LINT SET - .clippy.toml - v1 | ||
# See https://linebender.org/wiki/canonical-lints/ | ||
|
||
# The default Clippy value is capped at 8 bytes, which was chosen to improve performance on 32-bit. | ||
# Given that we are building for the future and even low-end mobile phones have 64-bit CPUs, | ||
# it makes sense to optimize for 64-bit and accept the performance hits on 32-bit. | ||
# 16 bytes is the number of bytes that fits into two 64-bit CPU registers. | ||
trivial-copy-size-limit = 16 | ||
|
||
# END LINEBENDER LINT SET | ||
|
||
# Don't warn about these identifiers when using clippy::doc_markdown. | ||
doc-valid-idents = ["Direct2D", "PostScript", ".."] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ version = "0.11.1" | |
authors = ["Raph Levien <[email protected]>"] | ||
license = "MIT OR Apache-2.0" | ||
edition = "2021" | ||
# TODO: When this hits 1.74, move lint configuration into this file via a lints table. | ||
# Keep in sync with RUST_MIN_VER in .github/workflows/ci.yml, with the README.md file, | ||
# and with the MSRV in the `Unreleased` section of CHANGELOG.md. | ||
rust-version = "1.65" | ||
|
@@ -21,8 +20,67 @@ default-target = "x86_64-unknown-linux-gnu" | |
targets = [] | ||
|
||
[lints] | ||
# This can be removed once we fix the benchmarks. | ||
rust.unsafe_code = "forbid" | ||
|
||
# LINEBENDER LINT SET - Cargo.toml - v2 | ||
# See https://linebender.org/wiki/canonical-lints/ | ||
rust.keyword_idents_2024 = "forbid" | ||
rust.non_ascii_idents = "forbid" | ||
rust.non_local_definitions = "forbid" | ||
rust.unsafe_op_in_unsafe_fn = "forbid" | ||
|
||
rust.elided_lifetimes_in_paths = "warn" | ||
rust.let_underscore_drop = "warn" | ||
rust.missing_debug_implementations = "warn" | ||
rust.missing_docs = "warn" | ||
rust.single_use_lifetimes = "warn" | ||
rust.trivial_numeric_casts = "warn" | ||
# Setting check-cfg can be removed once we fix the benchmarks. | ||
rust.unexpected_cfgs = { level = "warn", check-cfg = ['cfg(nightly)'] } | ||
rust.unit_bindings = "warn" | ||
rust.unnameable_types = "warn" | ||
rust.unreachable_pub = "warn" | ||
rust.unused_import_braces = "warn" | ||
rust.unused_lifetimes = "warn" | ||
rust.unused_macro_rules = "warn" | ||
rust.unused_qualifications = "warn" | ||
rust.variant_size_differences = "warn" | ||
|
||
clippy.allow_attributes = "warn" | ||
clippy.allow_attributes_without_reason = "warn" | ||
clippy.cast_possible_truncation = "warn" | ||
clippy.collection_is_never_read = "warn" | ||
clippy.dbg_macro = "warn" | ||
clippy.debug_assert_with_mut_call = "warn" | ||
clippy.doc_markdown = "warn" | ||
clippy.exhaustive_enums = "warn" | ||
clippy.fn_to_numeric_cast_any = "forbid" | ||
clippy.infinite_loop = "warn" | ||
clippy.large_include_file = "warn" | ||
clippy.large_stack_arrays = "warn" | ||
clippy.match_same_arms = "warn" | ||
clippy.mismatching_type_param_order = "warn" | ||
clippy.missing_assert_message = "warn" | ||
clippy.missing_errors_doc = "warn" | ||
clippy.missing_fields_in_debug = "warn" | ||
clippy.missing_panics_doc = "warn" | ||
clippy.partial_pub_fields = "warn" | ||
clippy.return_self_not_must_use = "warn" | ||
clippy.same_functions_in_if_condition = "warn" | ||
clippy.semicolon_if_nothing_returned = "warn" | ||
clippy.shadow_unrelated = "warn" | ||
clippy.should_panic_without_expect = "warn" | ||
clippy.todo = "warn" | ||
clippy.trivially_copy_pass_by_ref = "warn" | ||
clippy.unseparated_literal_suffix = "warn" | ||
clippy.use_self = "warn" | ||
clippy.wildcard_imports = "warn" | ||
|
||
clippy.cargo_common_metadata = "warn" | ||
clippy.negative_feature_names = "warn" | ||
clippy.redundant_feature_names = "warn" | ||
clippy.wildcard_dependencies = "warn" | ||
# END LINEBENDER LINT SET | ||
|
||
[features] | ||
default = ["std"] | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters