-
Notifications
You must be signed in to change notification settings - Fork 62
Lints #156
base: main
Are you sure you want to change the base?
Lints #156
Conversation
@@ -24,6 +24,7 @@ docker run -w /build --network test-net -v $BUILDKITE_BUILD_CHECKOUT_PATH:/build | |||
-e TEST_MYSQL=mysql://prisma:prisma@test-mysql:3306/prisma \ | |||
-e TEST_PSQL=postgres://prisma:prisma@test-postgres:5432/prisma \ | |||
-e TEST_MSSQL="sqlserver://test-mssql:1433;user=SA;password=$MSSQL_SA_PASSWORD;trustServerCertificate=true" \ | |||
-e RUSTFLAGS="-Dwarnings" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ensures we don't ship warnings to our main branch, but allows them to exist during local development.
|
||
#![forbid(unsafe_code, future_incompatible, rust_2018_idioms)] | ||
#![deny(missing_debug_implementations, nonstandard_style)] | ||
#![warn(missing_docs, unreachable_pub)] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the set of lints introduced. This includes linting for rust_2018_idioms
which are things that are disallowed in the current edition and can prevent us from using rust 2018 in the future. And future_incompatible
which are things that will be disallowed in a future edition (due next year).
Talked with @pimeys and some of the current issues we're running into will be resolved with the switch away from |
o/ This PR is an attempt to ensure that
quaint
will continue to compile in future versions of the compiler and introduce a few new code quality measures that will help automate review.This PR currently fails CI because it turns out that we, in fact, are not future compatible. In particular the issue we're running into is rust-lang/rust#62411, which will likely be turned into an error for the 2021 edition. But beyond that it seems there are a fair number of other issues we may want to address.
Anyway, I found myself having a spare 30 mins today and was curious how this would turn out. I'm opening this as a draft PR to share what's going on, and if this is deemed useful perhaps someone (could be me!) could go through and address the errors and warnings this has surfaced. Thanks!