Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import the full Linebender lint set
Browse files Browse the repository at this point in the history
DJMcNab committed Nov 4, 2024
1 parent b2a3c95 commit 5ca9717
Showing 5 changed files with 28 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[workspace]
resolver = "2"
members = [
"color",
"color_operations",
]
members = ["color", "color_operations"]

[workspace.package]
# Color version, also used by other packages which want to mimic Color's version.
@@ -23,6 +20,8 @@ repository = "https://github.com/linebender/color"
[workspace.lints]
rust.unsafe_code = "forbid"

# LINEBENDER LINT SET - v1
# See https://linebender.org/wiki/canonical-lints/
rust.keyword_idents_2024 = "forbid"
rust.non_ascii_idents = "forbid"
rust.non_local_definitions = "forbid"
@@ -44,11 +43,14 @@ 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"
@@ -70,6 +72,12 @@ 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

[workspace.dependencies]
color = { version = "0.1.0", path = "color", default-features = false }
color_operations = { version = "0.1.0", path = "color_operations" }
3 changes: 3 additions & 0 deletions color/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,9 @@ categories = ["graphics"]
repository.workspace = true
rust-version.workspace = true

# Whilst we prepare the initial release
publish = false

[features]
default = ["std"]
std = []
5 changes: 5 additions & 0 deletions color/src/lib.rs
Original file line number Diff line number Diff line change
@@ -2,6 +2,11 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
// LINEBENDER LINT SET - v1
// See https://linebender.org/wiki/canonical-lints/
// These lints aren't included in Cargo.toml because they
// shouldn't apply to examples and tests
#![warn(unused_crate_dependencies)]
#![warn(clippy::print_stdout, clippy::print_stderr)]

//! # Color
3 changes: 3 additions & 0 deletions color_operations/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,9 @@ categories = []
repository.workspace = true
rust-version.workspace = true

# Whilst we prepare the initial release
publish = false

[features]
default = ["std"]
std = []
5 changes: 5 additions & 0 deletions color_operations/src/lib.rs
Original file line number Diff line number Diff line change
@@ -2,7 +2,12 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
// LINEBENDER LINT SET - v1
// See https://linebender.org/wiki/canonical-lints/
// These lints aren't included in Cargo.toml because they
// shouldn't apply to examples and tests
#![warn(unused_crate_dependencies)]
#![warn(clippy::print_stdout, clippy::print_stderr)]

//! # Color Operations

0 comments on commit 5ca9717

Please sign in to comment.