Commit graph

6 commits

Author SHA1 Message Date
Kevin Reid
2067375697 Make struct_field_names lint on private fields of public structs.
Currently, If a struct is `pub` and its field is private, and
`avoid-breaking-exported-api = true` (default), then `struct_field_names`
will not lint the field, even though changing the field’s name is not a
breaking change. This is because the breaking-exported-api condition was
checking the visibility of the struct, not its fields (perhaps because
the same code was used for enums). With this change, Clippy will check
 the field’s effective visibility only.

Note: This change is large because some functions were moved into an
`impl` to be able to access more configuration. Consider viewing the
diff with whitespace ignored.
2025-03-04 10:49:13 -08:00
Guillaume Gomez
f666fd6417 Update UI tests 2025-02-15 13:38:16 +01:00
Oli Scherer
592fe89997 lower bstr version requirement to 1.6.0 2024-02-27 13:34:01 +00:00
Guillaume Gomez
7aa4624a8f Extend struct_field_names lint ui test 2024-01-05 16:44:41 +01:00
Yuxiang Qiu
88541d6637
fix some typos 2024-01-02 19:21:51 -05:00
jonboh
8b02dac542 add lint for struct field names
side effect for `enum_variants`:
use .first() instead of .get(0) in enum_variants lint
move to_camel_case to str_util module
move module, enum and struct name repetitions check to a single file `item_name_repetitions`
rename enum_variants threshold config option
2023-10-18 19:20:08 +02:00