diff --git a/lib/elixir_analyzer/exercise_test/common_checks/compiler_warnings.ex b/lib/elixir_analyzer/exercise_test/common_checks/compiler_warnings.ex index 00a7e6b7..e5296a2f 100644 --- a/lib/elixir_analyzer/exercise_test/common_checks/compiler_warnings.ex +++ b/lib/elixir_analyzer/exercise_test/common_checks/compiler_warnings.ex @@ -37,7 +37,7 @@ defmodule ElixirAnalyzer.ExerciseTest.CommonChecks.CompilerWarnings do type: :actionable, name: Constants.solution_compiler_warnings(), comment: Constants.solution_compiler_warnings(), - params: %{warnings: Enum.map_join(warnings, &format_warning/1)} + params: %{warnings: warnings |> Enum.sort() |> Enum.map_join(&format_warning/1)} }} ] end diff --git a/test/elixir_analyzer_test.exs b/test/elixir_analyzer_test.exs index 57e092db..3948858a 100644 --- a/test/elixir_analyzer_test.exs +++ b/test/elixir_analyzer_test.exs @@ -290,7 +290,7 @@ defmodule ElixirAnalyzerTest do "comment" => "elixir.solution.compiler_warnings", "params" => %{ "warnings" => - "warning: HashDict.new/0 is deprecated. Use maps and the Map module instead\n lib/lasagna.ex:7\n\nwarning: HashSet.member?/2 is deprecated. Use the MapSet module instead\n lib/lasagna.ex:12\n\nwarning: HashSet.new/0 is deprecated. Use the MapSet module instead\n lib/lasagna.ex:12\n\nwarning: Behaviour.defcallback/1 is deprecated. Use the @callback module attribute instead\n lib/lasagna.ex:4\n\n" + "warning: Behaviour.defcallback/1 is deprecated. Use the @callback module attribute instead\n lib/lasagna.ex:4\n\nwarning: HashDict.new/0 is deprecated. Use maps and the Map module instead\n lib/lasagna.ex:7\n\nwarning: HashSet.member?/2 is deprecated. Use the MapSet module instead\n lib/lasagna.ex:12\n\nwarning: HashSet.new/0 is deprecated. Use the MapSet module instead\n lib/lasagna.ex:12\n\n" }, "type" => "actionable" }, diff --git a/test_data/lasagna/deprecated_modules/expected_analysis.json b/test_data/lasagna/deprecated_modules/expected_analysis.json index c1134aa3..533d7368 100644 --- a/test_data/lasagna/deprecated_modules/expected_analysis.json +++ b/test_data/lasagna/deprecated_modules/expected_analysis.json @@ -1 +1 @@ -{"comments":[{"comment":"elixir.solution.compiler_warnings","params":{"warnings": "warning: HashDict.new/0 is deprecated. Use maps and the Map module instead\n lib/lasagna.ex:7\n\nwarning: HashSet.member?/2 is deprecated. Use the MapSet module instead\n lib/lasagna.ex:12\n\nwarning: HashSet.new/0 is deprecated. Use the MapSet module instead\n lib/lasagna.ex:12\n\nwarning: Behaviour.defcallback/1 is deprecated. Use the @callback module attribute instead\n lib/lasagna.ex:4\n\n"},"type":"actionable"},{"comment":"elixir.general.feedback_request","type":"informative"}],"summary":"Check the comments for some suggestions. 📣"} +{"comments":[{"comment":"elixir.solution.compiler_warnings","params":{"warnings":"warning: Behaviour.defcallback/1 is deprecated. Use the @callback module attribute instead\n lib/lasagna.ex:4\n\nwarning: HashDict.new/0 is deprecated. Use maps and the Map module instead\n lib/lasagna.ex:7\n\nwarning: HashSet.member?/2 is deprecated. Use the MapSet module instead\n lib/lasagna.ex:12\n\nwarning: HashSet.new/0 is deprecated. Use the MapSet module instead\n lib/lasagna.ex:12\n\n"},"type":"actionable"},{"comment":"elixir.general.feedback_request","type":"informative"}],"summary":"Check the comments for some suggestions. 📣"}