Git Product home page Git Product logo

Comments (5)

molant avatar molant commented on September 6, 2024

Another thing to keep in mind is that a rule might belong to several groups and could have different configurations in each one.
@alrra, can you put an example for that scenario?

from hint.

sarvaje avatar sarvaje commented on September 6, 2024

@alrra thoughts about how this should work?

from hint.

alrra avatar alrra commented on September 6, 2024

thoughts about how this should work?

I don't have a good idea yet. :(


They should be simple to enable, just like the regular rules. Maybe have them act the same as regular rules?

e.g. For a manifest group rule that contain all the manifest related rules:

"rules": {
    // ...
    "manifest": "warning",
    // ...
}

We could add an option in .sonarrc to enable all rules within a category (that also works with the command line).

Don't know is doing it automatically just based on the category is the best way.

Another thing to keep in mind is that a rule might belong to several groups and could have different configurations in each one.

One idea is to have them just like the other rules, but instead of calling create they can call another method with a JSON configuration similar to the content of the rules property from the .sonarrc file?

const groupRuleConfigs = {
  "rule1": {},
  "rule2": {
    "option1": "value",
    "option2": "value",
    // ...
  },
  // ...       
}

createGroupRule(groupRuleConfigs); 

Thoughts?

from hint.

molant avatar molant commented on September 6, 2024

@alrra I was thinking more about the scenario you had in mind when you suggested this rule. What specific rule will need to be used in 2 groups with different configurations, and what would those configurations need to be?

from hint.

alrra avatar alrra commented on September 6, 2024

What specific rule will need to be used in 2 groups with different configurations, and what would those configurations need to be?

Things are changing in the manifest space, but for now at least the display property will need to be standalone or fullscreen in order for some browsers to display the app install banner.

If we think of 2 categories, in the case of let's say (1) PWAs, the display property will be limited to those 2 values, but in the case of just having an ok, valid (2) manifest that restriction shouldn't exist.

from hint.

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.