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

Error when source file contains non ASCII chars #113

Closed
jfacorro opened this issue Sep 12, 2014 · 0 comments
Closed

Error when source file contains non ASCII chars #113

jfacorro opened this issue Sep 12, 2014 · 0 comments
Labels
Milestone

Comments

@jfacorro
Copy link
Contributor

The following error was caused by running elvis 0.2.0 on Erlang/OTP stdlib with the config file specified after the error messsage.

Error

Loading src/edlin.erl
escript: exception error: no match of right hand side value
                 {error,{{446,36},
                         aleppo_parser,
                         ["syntax error before: ","�"]}}
  in function  elvis_code:parse_tree/2 (src/elvis_code.erl, line 72)
  in call from elvis_file:parse_tree/2 (src/elvis_file.erl, line 50)
  in call from elvis_file:load_file_data/2 (src/elvis_file.erl, line 62)
  in call from lists:map/2 (lists.erl, line 1237)
  in call from lists:map/2 (lists.erl, line 1237)
  in call from elvis:rock/1 (src/elvis.erl, line 61)
  in call from lists:map/2 (lists.erl, line 1237)
  in call from elvis:rock/1 (src/elvis.erl, line 52)

elvis.config

[
 {
   elvis,
   [
    {config,
     [#{dirs => ["src"],
        filter => "*.erl",
        rules => [{elvis_style, line_length, [80]},
%                  {elvis_style, no_tabs, []},
                  {elvis_style, macro_names, []},
                  {elvis_style, macro_module_names, []},
                  {elvis_style, operator_spaces, [{right, ","},
                                                  {right, "++"},
                                                  {left, "++"}]},
                  {elvis_style, nesting_level, [3]},
                  {elvis_style, god_modules, [25]},
                  {elvis_style, no_if_expression, []},
                  {elvis_style, invalid_dynamic_call, [elvis]},
                  {elvis_style, used_ignored_variable, []},
                  {elvis_style, no_behavior_info, []},
                  {
                    elvis_style,
                    module_naming_convention,
                    ["^([a-z][a-z0-9]*_?)*(_SUITE)?$", []]
                  },
                  {elvis_style, state_record_and_type, []},
                  {elvis_style, no_spec_with_records, []}
                 ]
       },
      #{dirs => ["."],
        filter => "Makefile",
        rules => [{elvis_project, no_deps_master_erlang_mk, []}]
       },
      #{dirs => ["."],
        filter => "rebar.config",
        rules => [{elvis_project, no_deps_master_rebar, []}]
       },
      #{dirs => ["."],
        filter => "elvis.config",
        rules => [{elvis_project, old_configuration_format, []}]
       }
     ]
    }
   ]
 }
].
@jfacorro jfacorro added the bug label Sep 12, 2014
@jfacorro jfacorro added this to the 0.2.1 milestone Sep 12, 2014
elbrujohalcon pushed a commit that referenced this issue Sep 12, 2014
…port

[Fixes #113] Added support for unicode characters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant