diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b5857e9..583763ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - In `test_deps_compat`, the two subtests `check_extras` and `check_weakdeps` are now run by default. ([#202](https://github.com/JuliaTesting/Aqua.jl/pull/202)) [BREAKING] - `test_deps_compat` now reqiures compat entries for all dependencies. Stdlibs no longer get ignored. This change is motivated by similar changes in the General registry. ([#215](https://github.com/JuliaTesting/Aqua.jl/pull/215)) [BREAKING] - `test_piracy` is renamed to `test_piracies`. ([#230](https://github.com/JuliaTesting/Aqua.jl/pull/230)) [BREAKING] +- `test_ambiguities` and `test_piracies` now return issues in a defined order. This order may change in a patch release of Aqua.jl. ([#233](https://github.com/JuliaTesting/Aqua.jl/pull/233)) ### Removed diff --git a/src/ambiguities.jl b/src/ambiguities.jl index f2bba52b..7d13f7fb 100644 --- a/src/ambiguities.jl +++ b/src/ambiguities.jl @@ -220,6 +220,8 @@ function test_ambiguities_impl( end end + sort!(ambiguities, by = (ms -> (ms[1].name, ms[2].name))) + if !isempty(ambiguities) printstyled("$(length(ambiguities)) ambiguities found", color = :red) println() diff --git a/src/piracies.jl b/src/piracies.jl index 3b7f0f19..dc068a5f 100644 --- a/src/piracies.jl +++ b/src/piracies.jl @@ -190,9 +190,11 @@ function is_pirate(meth::Method; treat_as_own = Union{Function,Type}[]) end function hunt(mod::Module; skip_deprecated::Bool = true, kwargs...) - filter(all_methods(mod; skip_deprecated = skip_deprecated)) do method + piracies = filter(all_methods(mod; skip_deprecated = skip_deprecated)) do method method.module === mod && is_pirate(method; kwargs...) end + sort!(piracies, by = (m -> m.name)) + return piracies end end # module