-
Notifications
You must be signed in to change notification settings - Fork 87
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
Check fails on eunit tests #403
Comments
@bartekgorny you can configure that rule… or just disable it for the test modules. |
@elbrujohalcon The |
@jfacorro I think the he is getting an error about If you want to accept underscores at the beginning of the variable names by overriding the variable_naming_convention rule use something like this: [
{
elvis,
[
{config,
[#{dirs => ["src"],
filter => "*.erl",
rules => [{elvis_style,
variable_naming_convention,
#{ regex => "^([_A-Z][0-9a-zA-Z]*)$" }}],
ruleset => erl_files
} %,
% ...
]
}
]
}
]. @bartekgorny if that isn't the case, please paste the elvis output here so we can get a better idea about the issue. |
@harenson: he's having issues with macro_names and @jfacorro is right: the A PR with a |
The message is about variable naming:
It comes from a macro because
So, yes, seems I can solve it by crafting a regexp allowing double underscore at the beginning of a variable name. Thanks a lot! |
When checking a test module using eunit's ?assertEqual macros, elvis fails because of naming convention violation. This is because stock eunit.hrl defines those macros using variable names like __X, macros are expanded etc. We need at least a workaround, otherwise we'd have to choose between elvis and eunit which would be a difficult choice indeed.
The text was updated successfully, but these errors were encountered: