Commit Graph

12 Commits

Author SHA1 Message Date
JP Simard b83e0991b9 Remove all file headers
The MIT license doesn't require that all files be prepended with this
licensing or copyright information. Realm confirmed that they're ok with this
change. This will enable some companies to contribute to SwiftLint and the
date & authorship information will remain accessible via git source control.
2018-05-04 13:42:02 -07:00
Marcelo Fabri e2b195a4e2 Use SwiftDeclarationAttributeKind instead of string constants 2018-04-24 22:23:36 -07:00
Norio Nomura 2a0ac455bc 'flatMap' is deprecated: renamed to 'compactMap(_:)' 2018-04-08 13:28:09 +09:00
Ornithologist Coder c4b0053ed0 Adds fitBehavesLike and xitBehavesLike 2017-10-16 06:48:56 +02:00
Ornithologist Coder 61e19ea47f Adds [f,x]{describe, context, it} to Quick Call rule
* fdescribe
* fcontext
* fi
* xdescribe
* xcontext
* xit

are valid Quick calls and should not trigger this violation.

There should be another SwiftLint rule to discourage the use of focused
tests, so people don't commit and push code with focused tests.
2017-10-15 16:31:06 +02:00
Marcelo Fabri 05eb60a67e Check if spec() is instance method 2017-08-18 12:09:42 +02:00
Marcelo Fabri 084850af7a Alternative approach without ASTRule 2017-08-18 12:09:20 +02:00
Ornithologist Coder 1908160d2b Update Rules file 2017-08-18 11:34:37 +02:00
Ornithologist Coder fe96e4139a Improve validation
* Apply 'cheap' validation earlier. It's not a call to a restrictive
  method, returns no violations.
* But if it it's a call to a restrictive method, then checks if the file
  containts a QuickSpec and if the call is within the bounds of the
  QuickSpec class.
2017-08-18 11:24:03 +02:00
Ornithologist Coder da98afcaf7 Apply code review changes 2017-08-18 11:24:03 +02:00
Ornithologist Coder 339e23070e Rename examples file and update headers 2017-08-18 11:24:03 +02:00
Ornithologist Coder c707adb0d8 Add quick_discouraged_call opt-in rule
Implements #1781 (Method calls and object initialization inside Quick
'describe' and 'context' blocks can be harmful)
2017-08-18 11:24:02 +02:00