Comments (9)
@paulo-ferraz-oliveira what @onno-vos-dev wants is a warning that's emitted when there is an ignore rule that is effectively ignoring nothing… and therefore it's an useless ignore. Like the warning that we emit when a file/dir configuration block actually affects 0 files.
from elvis_core.
In theory you could simply have two config files (say elvis.config
and noignores.elvis.config
) and periodically run with the noignores
version to verify if you still need to ignore your modules, right?
You can even have an inverse.elvis.config
that's configured to run only on ignored files.
But, in any case, I'm not opposed to providing a command-line option to ignore the ignores so that you can run $ elvis --no-ignores
and it will disregard the ignore configs.
from elvis_core.
That was my kind of thinking. One of the projects that I work on is merging multiple configs from different teams into one before running elvis on the diff between the current branch and master. Creating an noignores.elvis.config or inverse.elvis.config would be quite problematic.
I'll try to implement some form of --no-ignores
functionality 👍
from elvis_core.
Keep in mind we have ignores both at group level…
[
{
elvis,
[
{config,
[#{dirs => ["src"],
filter => "*.erl",
ruleset => erl_files,
ignore => [this_module, that_module] %% <== THIS
},
…
…and also at rule level for some rules, e.g.
{elvis_style, invalid_dynamic_call, #{ignore => [elvis]}}
I'm sorry I can't link to proper docs (I already opened inaka/elvis#489 to fix that) :(
from elvis_core.
When I wrote my idea above I was thinking only about the ignore
at group-level, but considering our conversation in inaka/elvis#488 I guess you also want to ignore the individual per-rule ignores, right?
from elvis_core.
I got confused with so many ignore
s. What's the main goal?
from elvis_core.
As per the previous question, is this something we still need to pursue, or can the issue be closed?
from elvis_core.
Oh, that makes sense. I like it. We need to keep state, though, right? At the file level, for file-level config., and at the project level, for project level config. (actually, for module, module/function and module/function/arity, also).
from elvis_core.
Yeah, it's not trivial by any means.
from elvis_core.
Related Issues (20)
- Unused Variable Names HOT 5
- no_match_in_condition reports a warning even when the condition includes a valid match
- Bug (?) in atom_naming_convention HOT 2
- Using ets:fun2ms without including ms_transform.hrl should be an error HOT 3
- New ruleset `gitignore`
- Propose `gen_server` et all "no-timeout" functions as `no_common_caveats`?
- Have a simple way to run `all` checks (even optional ones) HOT 8
- New rule: consistent file names HOT 2
- New Rule: No Import Type
- New Rule: Unsafe usage of application HOT 1
- Wildcards in no_call_functions MFA HOT 4
- Potential new rule: only call internal_export'ed functions from test code HOT 2
- No consecutive strings
- Rule: Do not use lists on start_link/3,4 and init/1 HOT 3
- no_successive_maps obsolete due to Erlang change?
- New rule: consistent deps applications HOT 3
- max_function_length counts multiple function clauses as a single function HOT 2
- Count `_to_atom` as common caveats? HOT 2
- Should `no_macros` consider `LOG_...` as allowed? HOT 3
- no_successive_maps doesn't work when nested
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elvis_core.