Swiftlint: What is the purpose of opt_in_rules?

Created on 20 Oct 2016  路  3Comments  路  Source: realm/SwiftLint

I know that this question might by stupid, but I don't get the idea behind opt_in_rules. Can someone explain me what is the purpose of opt_in_rules?
Thanks

question

Most helpful comment

Thank you for such a good answer!

All 3 comments

opt_in_rules are disabled by default (you have to explicitly add them on your configuration file).

From what I've seen there're a few reasons on why a rule should be opt-in:

  • A rule that can have many false positives (empty_count)
  • A rule that is too slow
  • A rule that is not general consensus or only useful in some cases (force_unwrapping, missing_docs)

That's exactly right.

Thank you for such a good answer!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Den-Ree picture Den-Ree  路  3Comments

ivanbruel picture ivanbruel  路  3Comments

muzamilhassan1987 picture muzamilhassan1987  路  3Comments

AliSoftware picture AliSoftware  路  3Comments

bourquep picture bourquep  路  3Comments