Skip to content

Commit

Permalink
lintcheck: sort crates before linting
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Feb 19, 2021
1 parent 4974734 commit 22aeec0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clippy_dev/src/lintcheck.rs
Expand Up @@ -39,7 +39,7 @@ struct TomlCrate {

/// Represents an archive we download from crates.io, or a git repo, or a local repo/folder
/// Once processed (downloaded/extracted/cloned/copied...), this will be translated into a `Crate`
#[derive(Debug, Serialize, Deserialize, Eq, Hash, PartialEq)]
#[derive(Debug, Serialize, Deserialize, Eq, Hash, PartialEq, Ord, PartialOrd)]
enum CrateSource {
CratesIo {
name: String,
Expand Down Expand Up @@ -376,6 +376,9 @@ fn read_crates(toml_path: Option<&str>) -> (String, Vec<CrateSource>) {
unreachable!("Failed to translate TomlCrate into CrateSource!");
}
});
// sort the crates
crate_sources.sort();

(toml_filename, crate_sources)
}

Expand Down

0 comments on commit 22aeec0

Please sign in to comment.