mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-01 16:08:30 +00:00
lints
This commit is contained in:
1 parent
63008a7fe8
commit
afc4fbdcb5
4 files changed
+11
-7
No files matched your search
@@ -32,6 +32,7 @@ deny = [
|
||||
"clippy::empty_structs_with_brackets", # Lint: {} feels less aesthetic than ;
|
||||
"clippy::implicit_clone", # Lint: Recommendation here seems more idiomatic.
|
||||
"clippy::option_option", # Lint: Don't ever Option<Option<T>>! Enums instead.
|
||||
"clippy::redundant_field_names", # Lint: Duplicate names is a burden when reading: you wonder why they're dupes.
|
||||
"clippy::redundant_static_lifetimes", # Lint: feels more modern to elide static lifetimes
|
||||
"clippy::zero_sized_map_values", # Lint: use a HashSet instead of HashMap<T, ()>.
|
||||
|
||||
@@ -45,6 +46,7 @@ warn = [
|
||||
|
||||
allow = [
|
||||
# Rust
|
||||
"deprecated", # Other systems can handle deprecated code instead of the linter
|
||||
"missing_docs", # Not everything needs documentation. Too much documentation is bad. Literate code.
|
||||
|
||||
# Clippy
|
||||
|
||||
@@ -3,7 +3,6 @@ use actix_web::http::Uri;
|
||||
use anyhow::anyhow;
|
||||
use http_server_common::request::get_request_host::get_request_host;
|
||||
use reusable_types::server_environment::ServerEnvironment;
|
||||
use std::ops::Deref;
|
||||
use std::str::FromStr;
|
||||
|
||||
/// Multi-environment configuration for 3rd party redirects, eg. Stripe checkout flow and
|
||||
@@ -51,7 +50,6 @@ impl ThirdPartyUrlRedirector {
|
||||
let maybe_host = parts.get(0).map(|s| *s);
|
||||
let maybe_port = parts
|
||||
.get(1)
|
||||
.map(|p| p.deref())
|
||||
.map(|p| u32::from_str(p))
|
||||
.transpose()?;
|
||||
|
||||
|
||||
+5
-2
@@ -6,10 +6,13 @@ echo 'Running lints...'
|
||||
|
||||
# TODO: 'fakeyou_client' is broken
|
||||
# TODO: 'sqlite_queries' and 'aichatbot-sidecar' are broken due to sqlite
|
||||
# newrelic excluded since we don't author it
|
||||
|
||||
cargo cranky \
|
||||
--workspace \
|
||||
--exclude sqlite_queries \
|
||||
--exclude fakeyou_client \
|
||||
--exclude aichatbot-sidecar \
|
||||
--exclude fakeyou_client \
|
||||
--exclude sqlite_queries \
|
||||
--exclude newrelic-telemetry
|
||||
|
||||
echo 'Lints passed.'
|
||||
+4
-3
@@ -9,11 +9,11 @@ echo 'Running tests...'
|
||||
|
||||
cargo test \
|
||||
--workspace \
|
||||
--exclude sqlite_queries \
|
||||
--exclude aichatbot-sidecar \
|
||||
--exclude fakeyou_client \
|
||||
--exclude billing_component \
|
||||
--exclude inference-job
|
||||
--exclude fakeyou_client \
|
||||
--exclude inference-job \
|
||||
--exclude sqlite_queries
|
||||
|
||||
# Single broken tests
|
||||
cargo test \
|
||||
@@ -21,3 +21,4 @@ cargo test \
|
||||
-- \
|
||||
--skip util::audiowmark::tests::test_audiowmark
|
||||
|
||||
echo 'Tests passed.'
|
||||
Reference in new issue
Block a user