Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elvis cries on non-parsable files #509

Closed
robertoaloi opened this issue Mar 17, 2020 · 0 comments · Fixed by inaka/elvis_core#217
Closed

Elvis cries on non-parsable files #509

robertoaloi opened this issue Mar 17, 2020 · 0 comments · Fixed by inaka/elvis_core#217
Labels

Comments

@robertoaloi
Copy link

Given:

-module(els_test).

-export([one/0]).

one() ->
  <<"

Elvis replies with:

$ elvis rock src/els_test.erl
Error: {badmatch,
                           {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}} when loading file "src/els_test.erl".
# src/els_test.erl [FAIL]
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'no_debug_call'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'function_naming_convention'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'operator_spaces'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'invalid_dynamic_call'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'dont_repeat_yourself'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'god_modules'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'no_nested_try_catch'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'variable_naming_convention'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'no_spec_with_records'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'state_record_and_type'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'module_naming_convention'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'no_behavior_info'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'used_ignored_variable'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'no_if_expression'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'nesting_level'.
Error: '{badmatch,
                            {error,{{6,5},erl_scan,{string,34,"\n"}},{7,1}}}' while applying rule 'macro_module_names'.

It should probably handle the case and not report the internal badmatch errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants