New lint absolute_paths

This commit is contained in:
Catherine 2023-06-21 21:15:20 -05:00 committed by Catherine Flores
parent d2c9047a92
commit 9cf1509b25
18 changed files with 365 additions and 5 deletions

View file

@ -551,6 +551,16 @@ define_Conf! {
///
/// Whether to allow `r#""#` when `r""` can be used
(allow_one_hash_in_raw_strings: bool = false),
/// Lint: ABSOLUTE_PATHS.
///
/// The maximum number of segments a path can have before being linted, anything above this will
/// be linted.
(absolute_paths_max_segments: u64 = 2),
/// Lint: ABSOLUTE_PATHS.
///
/// Which crates to allow absolute paths from
(absolute_paths_allowed_crates: rustc_data_structures::fx::FxHashSet<String> =
rustc_data_structures::fx::FxHashSet::default()),
}
/// Search for the configuration file.