Giter Club home page Giter Club logo

Comments (9)

elbrujohalcon avatar elbrujohalcon commented on June 8, 2024 1

@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.

elbrujohalcon avatar elbrujohalcon commented on June 8, 2024

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.

onno-vos-dev avatar onno-vos-dev commented on June 8, 2024

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.

elbrujohalcon avatar elbrujohalcon commented on June 8, 2024

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.

elbrujohalcon avatar elbrujohalcon commented on June 8, 2024

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.

paulo-ferraz-oliveira avatar paulo-ferraz-oliveira commented on June 8, 2024

I got confused with so many ignores. What's the main goal?

from elvis_core.

paulo-ferraz-oliveira avatar paulo-ferraz-oliveira commented on June 8, 2024

As per the previous question, is this something we still need to pursue, or can the issue be closed?

from elvis_core.

paulo-ferraz-oliveira avatar paulo-ferraz-oliveira commented on June 8, 2024

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.

elbrujohalcon avatar elbrujohalcon commented on June 8, 2024

Yeah, it's not trivial by any means.

from elvis_core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.