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

Possible false positive? #236

Closed
technion opened this issue Jun 13, 2015 · 4 comments
Closed

Possible false positive? #236

technion opened this issue Jun 13, 2015 · 4 comments
Assignees
Labels

Comments

@technion
Copy link
Contributor

Hi,

I'm trying to resolve an issue I'm encountering with Elvis on this piece of code within a EUnit test.

ip_results_to_json_test() ->
    ?assertEqual(ip_results_to_json([{{127, 0, 0, 253}, not_vulnerable}, {{127, 0, 0, 252}, not_vulnerable}]),
            <<"[{\"address\":\"127.0.0.253\",\"stat\":\"not_vulnerable\"},{\"address\":\"127.0.0.252\",\"stat\":\"not_vulnerable\"}]">>).

The last of those lines is line 39 of the code, producing this error:

# src/ipmangle.erl [FAIL]
  - operator_spaces
    - Missing space after "," on line 39

As far as I can see, that is binary data, and it shouldn't be considering those commas to be operators. Implementing those spaces changes the data the function is expecting.

If it helps, the complete codebase is here: https://github.com/technion/erlvulnscan

It's my first Erlang project so I could easily be missing something obvious :)

@jfacorro
Copy link
Contributor

@technion This is definitely a false positive, so it is a bug in elvis. We will take a look at it as soon as possible. Thank you for reporting this.

@jfacorro jfacorro added the bug label Jun 13, 2015
@jfacorro
Copy link
Contributor

Possibly related to #233

@jfacorro
Copy link
Contributor

@technion This should be fixed in master. Sorry for the delay 😝. Could you please confirm when you get the chance?

@technion
Copy link
Contributor Author

No problems, tested and confirmed resolved.

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

3 participants