Code Monkey home page Code Monkey logo

Comments (6)

mgechev avatar mgechev commented on August 17, 2024

We can make the rule configurable. I'd prefer to keep this check under var-naming so we can be as compatible with golint as possible.

If you have some spare time, it'll be great if you can give it a try! We can discuss the approach you're planning here so we can collect some more thoughts! // cc @chavacava

from revive.

chavacava avatar chavacava commented on August 17, 2024

As described by @cvbarros, the configuration with an optional (empty by default) white list of "relaxed" initialisms seems the most flexible approach. It may lead to inconsistencies across projects but not more than adding a new rule (option 3).

from revive.

mgechev avatar mgechev commented on August 17, 2024

I'm thinking of two options:

  • Allow developers to provide a custom list of initialisms. By default, we use the built-in one
  • Allow developers to add extra valid Initialisms

The second aligns with what you mentioned, and the configuration will be less verbose in case the only initialisms a developer wants to alter is Id, so we can go with it.

from revive.

cvbarros avatar cvbarros commented on August 17, 2024

I think that 2 will also provide a less verbose, while still flexible approach. Feel free to work on it if you want, otherwise I'll give it a try next week 👍

from revive.

mgechev avatar mgechev commented on August 17, 2024

@cvbarros I won't be able to work on it shortly. Assigned the issue to you so you can take care.

from revive.

mgechev avatar mgechev commented on August 17, 2024

I implemented this feature right here.

Let me know if you have other suggestions.

from revive.

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.