File tree 1 file changed +1
-11
lines changed
1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -665,16 +665,6 @@ fn lintcheck_needs_rerun(lintcheck_logs_path: &Path) -> bool {
665
665
logs_modified < clippy_modified
666
666
}
667
667
668
- fn is_in_clippy_root ( ) -> bool {
669
- if let Ok ( pb) = std:: env:: current_dir ( ) {
670
- if let Some ( file) = pb. file_name ( ) {
671
- return file == PathBuf :: from ( "rust-clippy" ) ;
672
- }
673
- }
674
-
675
- false
676
- }
677
-
678
668
/// lintchecks `main()` function
679
669
///
680
670
/// # Panics
@@ -683,7 +673,7 @@ fn is_in_clippy_root() -> bool {
683
673
/// or if lintcheck is executed from the wrong directory (aka none-repo-root)
684
674
pub fn main ( ) {
685
675
// assert that we launch lintcheck from the repo root (via cargo lintcheck)
686
- if ! is_in_clippy_root ( ) {
676
+ if std :: fs :: metadata ( "lintcheck/Cargo.toml" ) . is_err ( ) {
687
677
eprintln ! ( "lintcheck needs to be run from clippys repo root!\n Use `cargo lintcheck` alternatively." ) ;
688
678
std:: process:: exit ( 3 ) ;
689
679
}
You can’t perform that action at this time.
0 commit comments