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

Stricter match for macros as module/function names #177

Merged
merged 3 commits into from
Nov 21, 2014

Conversation

dvaergiller
Copy link

This avoids matching expressions that have colons but are not function
calls, for example when matching or building binaries. The main change
is that the regular expression only matches if there is a left
parenthesis following the function name, with zero or more whitespace
characters in between. The '[A-z0-9_]' pattern has been replaced by
'\w' only because the expression became a bit long otherwise.

This avoids matching expressions that have colons but are not function
calls, for example when matching or building binaries. The main change
is that the regular expression only matches if there is a left
parenthesis following the function name, with zero or more whitespace
characters in between. The '[A-z0-9_]' pattern has been replaced by
'\\w' only because the expression became a bit long otherwise.
@jfacorro
Copy link
Contributor

@dvaergiller Would it be possible to add some expression(s) that shouldn't fail in test/examples/fail_macro_module_names.erl? The test case that uses this file is here. Thanks for implementing this, I think this might also address #172.

@dvaergiller
Copy link
Author

I double-checked that the additions to the test causes master branch to fail (which it should not).

jfacorro added a commit that referenced this pull request Nov 21, 2014
Stricter match for macros as module/function names
@jfacorro jfacorro merged commit a0bbe59 into inaka:master Nov 21, 2014
@jfacorro
Copy link
Contributor

@dvaergiller Merged! Thanks!

@dvaergiller dvaergiller deleted the fix_module_macro_check branch November 21, 2014 14:22
@elbrujohalcon
Copy link
Member

Should we close #172 ?

@jfacorro
Copy link
Contributor

@elbrujohalcon I agree, I just closed it.

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

Successfully merging this pull request may close these issues.

None yet

3 participants