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

[Q] Ignore existing issues, without ignoring whole modules. #497

Closed
define-null opened this issue Apr 9, 2019 · 4 comments
Closed

[Q] Ignore existing issues, without ignoring whole modules. #497

define-null opened this issue Apr 9, 2019 · 4 comments

Comments

@define-null
Copy link
Contributor

define-null commented Apr 9, 2019

So there is project with a large code base, that has collected some bad code smells, which we would like to tackle. And with Elvis, as with Dialyzer it's impossible to fix everything at one go, you need to gradually polish off, and clean the code. The problem is, that currently it seems, the only way to ignore certain problems is to add module name to the ignore section of the rule. That could work for relatively small modules, but for large once if could become a real pain.
When it comes to dialyzer the common practice it seems - to create a dializer.ignore file with the warnings, that currently exist in the project, and gradually remove one line by one in the eventual phashion.

Before introducing any PRs, I'd like to reach out and get some opinion about similar approach for Elvis. Potentially to have a format mode, where elvis would print filename, line, and the error that it encounter. For rules like god modules the line could be equal to 1 or 0 for instance, just to indicate the problem.

What do you think of such an approach? Just to be clear, I want to generate output close to https://github.com/basho/riak/blob/develop/dialyzer.ignore-warnings

@elbrujohalcon
Copy link
Member

We do have an {output_format, …} param that you can add to elvis.config
Is there any way to implement this change by extending the list of acceptable values for it?

@define-null
Copy link
Contributor Author

Yes sure, I will update the PR to use new value in output_format instead

@paulo-ferraz-oliveira
Copy link
Collaborator

The linked PR is merged. Should this task be closed?

@elbrujohalcon
Copy link
Member

Yes

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

No branches or pull requests

4 participants