Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes custom rule regex and allow disable in code #743

Merged
merged 2 commits into from
Aug 21, 2016

Conversation

masters3d
Copy link
Contributor

@masters3d masters3d commented Aug 6, 2016

closes #717
closes #726
closes #515
Testing files:

custom_rules:
  void_as_return:
    name: "Void as Parameter"
    message: "Use Void as return type instead of ()."
    regex: "(->[ ]?\(\))"
  parenthesis_spacing:
    name: "Parenthesis Spacing"
    message: "Don't put a space inside a parenthesis."
    regex: "\(\s|\s\)"
func hey() -> () {
    return
}
/// space(  ) ( sd) (dd )
func space( ) {
    return
}

func space2( ) {
    return ( )
}

let abc: () -> () = {}

@codecov-io
Copy link

codecov-io commented Aug 6, 2016

Current coverage is 89.35% (diff: 93.33%)

Merging #743 into master will increase coverage by <.01%

@@             master       #743   diff @@
==========================================
  Files            73         73          
  Lines          2442       2452    +10   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           2182       2191     +9   
- Misses          260        261     +1   
  Partials          0          0          

Powered by Codecov. Last update f4d9976...4509495

@masters3d masters3d changed the title Fixes custom rule regex Fixes custom rule regex and allow disable in code Aug 8, 2016
@masters3d
Copy link
Contributor Author

masters3d commented Aug 8, 2016

// swiftlint:disable void_as_return
// swiftlint:disable parenthesis_spacing

Custom rules can now be disabled in code.

@jpsim
Copy link
Collaborator

jpsim commented Aug 21, 2016

Thanks @masters3d! I'll push a few minor tweaks in a followup commit.

@jpsim jpsim merged commit 7af9fa7 into realm:master Aug 21, 2016
jpsim added a commit that referenced this pull request Aug 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants