OskarStark / doctor-rst

Bring consistency to documentation
MIT License
35 stars 21 forks source link

Allow to disable specific rules #1340

Closed javiereguiluz closed 1 year ago

javiereguiluz commented 1 year ago

Right now you can configure the rules to consider for the analysis:

rules:
    american_english: ~
    avoid_repetetive_words: ~
    # ...

Rules not included in the list are ignored. The problem of this approach is that you'll miss all the new rules added by this nice project!

In one of my applications what I need is "include all present and future DOCtor-RST rules except one specific rule". This is what I'd need:

excluded_rules:
    yaml_instead_of_yml_suffix: ~

I'm adding this issue in case others have the same need and can add some comment to see if there's interest about this. Thanks.

MrYamous commented 1 year ago

(Just a thought) Maybe I have a misunderstanding of how it works but I guess some rules are conflicting (a lot of doSomethingRule vs NoDoSomethingRule), how do you handle that in your project where you need all rules ? A configuration that allows all new rules should perhaps provide a way to handle these conflicts

OskarStark commented 1 year ago

Maybe we should add an option getConflictibgRules() to the rules where we can exclude certain ones.

alamirault commented 1 year ago

Or we can use groups Symfony or Sonata but in this case, we must provide default value and I'm not sure it's a good idea. For Example What's the default value for versionadded_directive_min_version ?

Like phpstan, we can also provide an opinionated list of rules with settings, which can be included in .doctor-rst.yaml ?

javiereguiluz commented 1 year ago

Since I originally reported this, I've never needed this feature again. I'm closing it because I think that, to make open-source projects sustainable, features should be added only when they are clearly needed or when they bring a lot of value to the project. Thanks!

OskarStark commented 1 year ago

I reopened because the PR is ready now 🙋‍♂️😃👍🏻

OskarStark commented 1 year ago

Refs #1395

alamirault commented 1 year ago

@OskarStark I did not remember why I added a ref to this issue but this will not fix this usecase. (I will update description)

OskarStark commented 1 year ago

I did this :-)