Skip to content

Commit

Permalink
order compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegillet committed Oct 12, 2023
1 parent ba75858 commit c76a0c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/elixir_analyzer_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -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. 📣"}

0 comments on commit c76a0c6

Please sign in to comment.