Skip to content

Commit

Permalink
Avoid compiler_diagnostics crash in case module name is invalid (erla…
Browse files Browse the repository at this point in the history
…ng-ls#1191)

Invalid syntax on the module attribute can cause a crash.
  • Loading branch information
robertoaloi committed Feb 4, 2022
1 parent 5ee868c commit 4205028
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/els_lsp/src/els_compiler_diagnostics.erl
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,9 @@ module_name_check(Path) ->
?DIAGNOSTIC_ERROR,
<<"Compiler (via Erlang LS)">>),
[Diagnostic]
end
end;
_ ->
[]
end;
_ ->
[]
Expand Down

0 comments on commit 4205028

Please sign in to comment.