Read and use deprecated configuration (as well as emitting a warning)
Co-authored-by: Andy Caldwell <andycaldwell@microsoft.com>
This commit is contained in:
committed by
Andy Caldwell
parent
d814681429
commit
08e7ec4047
@@ -487,7 +487,7 @@ pub fn read_conf(sess: &Session) -> Conf {
|
||||
},
|
||||
};
|
||||
|
||||
let TryConf { conf, errors } = utils::conf::read(&file_name);
|
||||
let TryConf { conf, errors, warnings } = utils::conf::read(&file_name);
|
||||
// all conf errors are non-fatal, we just use the default conf in case of error
|
||||
for error in errors {
|
||||
sess.err(&format!(
|
||||
@@ -497,6 +497,15 @@ pub fn read_conf(sess: &Session) -> Conf {
|
||||
));
|
||||
}
|
||||
|
||||
for warning in warnings {
|
||||
sess.struct_warn(&format!(
|
||||
"error reading Clippy's configuration file `{}`: {}",
|
||||
file_name.display(),
|
||||
format_error(warning)
|
||||
))
|
||||
.emit();
|
||||
}
|
||||
|
||||
conf
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user