You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to cargo clippy provide lints to catch common problems and provide improvement tips.
Should be grouped into several groups such as correctnessstyleperf. With associated lint levels.
Lints
unused
Checks for unused type definitions.
excessive-tuple
Due to restrictions in Rusts macros, Readable and Writable are only implemented for tuples up to (including) 16 fields.
type-complexity
Checks for inline types above a certain complexity threshold.
Complex types are bad for readability and should be simplified by breaking them up using type aliases
too-many-arguments
Too many arguments reduce readability and should be grouped using new types.
too-many-returns
Too many returns reduce readability and should be grouped using new types.
needless-result
Checks for result<t, ()> types that can be written more concisely as option<t>
invisible-characters
Invisible characters can mess up all sorts of things
variant-without-payload
Rejects variants that only have unit cases without any types. These should be declared as enums instead.
variant-with-typenames
Rejects variants which names equal the type should be written as unions.
Example:
variant {
u8<u8>,
list_u8<list<u8>>
}
# should be
enum {
u8,
list<u8>
}
record-of-bools
Rejects structs with all-bool fields that should be written as flags.
list-of-enums
A list of enum values is semantically equivalent as flags.
enum value {
a,
b,
c,
}
type values = list<value>
// should be written as
flags values {
a,
b,
c,
}
The text was updated successfully, but these errors were encountered:
Similar to
cargo clippy
provide lints to catch common problems and provide improvement tips.Should be grouped into several groups such as
correctness
style
perf
. With associated lint levels.Lints
unused
Checks for unused type definitions.
excessive-tuple
Due to restrictions in Rusts macros,
Readable
andWritable
are only implemented for tuples up to (including) 16 fields.type-complexity
Checks for inline types above a certain complexity threshold.
Complex types are bad for readability and should be simplified by breaking them up using type aliases
too-many-arguments
Too many arguments reduce readability and should be grouped using new types.
too-many-returns
Too many returns reduce readability and should be grouped using new types.
needless-result
Checks for
result<t, ()>
types that can be written more concisely asoption<t>
invisible-characters
Invisible characters can mess up all sorts of things
variant-without-payload
Rejects variants that only have unit cases without any types. These should be declared as
enum
s instead.variant-with-typenames
Rejects variants which names equal the type should be written as
union
s.Example:
record-of-bools
Rejects structs with all-bool fields that should be written as flags.
list-of-enums
A list of enum values is semantically equivalent as
flags
.enum value { a, b, c, } type values = list<value> // should be written as flags values { a, b, c, }
The text was updated successfully, but these errors were encountered: