Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.28 KB

CONTRIBUTING.md

File metadata and controls

35 lines (23 loc) · 1.28 KB

Contributing

To contribute a new style rule first fork the repo and create your branch from master. Then open a PR and propose the rule following the structure below.

If you have an idea that's not completely fleshed out, please open an issue to discuss.

Structure of a new rule:

At minimum every rule should contain:

  1. A permalink to reference easily.
  2. A short description.
  3. A link to the appropriate SwiftLint / SwiftFormat rule.
  4. (optional) A "Why?" section describing the reasoning behind the rule.
  5. A code example describing the incorrect and correct behaviours.

Example:

  • (link) This is the description of the rule. SwiftLint: some_rule SwiftFormat: some_rule

    Why?

    This is an explanation of why this rule is needed.

    // WRONG
    func someIncorrectCode {}
    
    // GOOD
    func someGoodCode {}