Lightning-Flow-Scanner / lightning-flow-scanner-sfdx

A Salesforce CLI Plugin designed to pinpoint deviations from Industry Best Practices in Salesforce Flows, ensuring standards of business automation excellence.
https://www.npmjs.com/package/lightning-flow-scanner
GNU Affero General Public License v3.0
112 stars 12 forks source link

Define default severity for each rule #55

Closed nvuillam closed 1 year ago

nvuillam commented 1 year ago

It seems that for the moment, when they are not overridden in config file, all rules are with error severity by default.

Some rules should just be warning, like missing flow description, because they are not as impacting than HardcodedId for example

It would be nice to have a default severity for each rule that is corresponding to its negative impact on the Salesforce org

RubenHalman commented 1 year ago

I really like this as Ive been thinking it will open up also creating a functionality to generate a report for prioritization in big projects. I think this should be combined with a rule category. In most linters I know missing documentation actually gets the highest prio, so your given example would be implemented the other way around. My question is how would we drive this discussion amongst our users to define the default severity?

nvuillam commented 1 year ago

I think we can keep the "error", "warning" and "note" levels :)

Missing documentation being "note" as it's is not nice but can't break anything

As you are a flow expert, I suggest you make opiniotated decisions, then the community will make remarks if necessary :)

RubenHalman commented 1 year ago

@nvuillam This is a good suggestion, however with only 8 rules, it is not hard for a user to configure their own severity for each rule. When the amount of rules grow, this is definitely a feature worth building!

nvuillam commented 1 year ago

@RubenHalman in that case we should provide in documentation an example of config file with the full list of rules, so users can easily start from it instead of having to write it all ^^

RubenHalman commented 1 year ago

Yes good suggestion. I'll do that I the example repo, it's small so I'm keeping this closed if you don't mind.