Commit Graph

1864 Commits

Author SHA1 Message Date
Norio Nomura 85542a6f8d Remove DispatchQueue.sync from Array.parallelMap
`DispatchQueue.sync` was required to avoid CoW on calling `subscript` from multiple copied instances of `Array`.
Since `UnsafeMutableBufferPointer` does not cause CoW on same situation, `DispatchQueue.sync` can be removed.
2018-03-08 15:56:28 +09:00
JP Simard a7a8a69fa2 Improve Array.parallelMap
By applying concepts from Swift Talk 90: https://talk.objc.io/episodes/S01E90-concurrent-map

Notably:
* Removing `@escaping` from block parameter
* Avoiding Array.append & sorting
* Using a constant DispatchQueue label
2018-03-07 09:27:35 -08:00
rounak 639522163f Improve console description for ExplicitTypeInterfaceConfiguration
Add more tests for ExplicitTypeInterface
2018-02-25 19:18:38 -08:00
rounak e515f43424 Add separate test files for ExplicitTypeInterfaceRule & Config
Respond to PR comments
2018-02-25 19:18:38 -08:00
Rounak 975bd7b86e Fix linter warnings 2018-02-25 19:18:38 -08:00
Rounak 2a7abcf542 Add new configuration for Explicit Type Interface Rule to allow exempting certain types of variables
Signed-off-by: Rounak <rounak91@gmail.com>
2018-02-25 19:18:38 -08:00
Marcelo Fabri cc38e33013 Fix some cases where colon rule wouldn't autocorrect dictionary literals
Fixes #2050
2018-02-14 22:13:53 -08:00
Marcelo Fabri c875bed813 release 0.25.0 2018-02-11 22:15:36 -08:00
Jamie Edge 0a4b562452 Removed dependency upon non-Linux NSString method. 2018-02-11 18:01:09 -08:00
Jamie Edge b80798b875 Fix directories with a '.swift' suffix being treated as files. 2018-02-11 18:01:09 -08:00
Marcelo Fabri 4eb749c870 Fix false positive in force_unwrapping when returning collection from function
Fixes #2042
2018-02-11 17:34:15 -08:00
Marcelo Fabri 8c2c4b0a01 Fix false positive in empty_enum_arguments rule when using closures
Fixes #2041
2018-02-10 20:21:58 -08:00
Marcelo Fabri 5eb48d69b7 Merge pull request #2030 from mshibanami/ignoring_functions_of_line_length
Fix ignores_function_declarations of line_length doesn't work in some cases
2018-02-03 23:05:53 -08:00
Manabu Nakazawa 9677c92285 Fix ignores_function_declarations of line_length doesn't work in some cases 2018-02-04 15:44:35 +09:00
Marcelo Fabri 03b4d6b020 Fix violations introduced when linting with Swift 4.1
Part of #2021
2018-02-03 22:23:48 -08:00
Marcelo Fabri d4346d2d37 Merge pull request #2013 from ornithocoder/optional_boolean
Adds opt-in discouraged_optional_boolean rule
2018-02-03 15:53:10 -08:00
JP Simard 623590acd1 Update dependencies 2018-02-01 15:35:41 -08:00
Marcelo Fabri 4c8df19c84 Use SourceKit to validate associatedtype and typealias in type_name rule when linting with Swift 4.1
Part of #2021
2018-01-26 22:08:59 -08:00
Marcelo Fabri b204c18d04 Improve type_name rule violations to be positioned on the type name
Part of #2021
2018-01-25 20:28:33 -08:00
Marcelo Fabri 5d7346b8a2 Don’t validate local vars in let_var_whitespace rule
As part of #2021
2018-01-25 20:00:31 -08:00
Marcelo Fabri 19edf2608b Fix enclosedSwiftAttributes in Swift 4.1
Fixes #2019
2018-01-25 09:47:11 -08:00
Marcelo Fabri 203d2439bd Merge pull request #2015 from realm/mf-explict-acl-false-positives
Fix false positives in `explicit_acl` rule
2018-01-25 09:43:25 -08:00
Marcelo Fabri 19c8536500 Fix false negative in unneeded_parentheses_in_closure_argument
Fixes #2017
2018-01-24 14:07:56 -08:00
Marcelo Fabri a4f701b96e Fix false positives in explicit_acl rule
Fixes #2014
2018-01-22 11:22:49 -08:00
Ornithologist Coder d31550f61f Updates examples 2018-01-22 07:29:04 +01:00
Ornithologist Coder 9787cf01d4 Adds more triggering examples 2018-01-22 01:20:57 +01:00
Ornithologist Coder f485be257d Adds opt-in discouraged_optional_boolean rule 2018-01-22 00:44:23 +01:00
Manabu Nakazawa daeb13c2bb Add testcases to ColonRule.description 2018-01-16 01:45:49 +09:00
Manabu Nakazawa e2bd9f8ed8 Fix: Colon Rule's autocorrect not working properly 2018-01-16 01:00:56 +09:00
JP Simard 7bf32346cc release 0.24.2 2018-01-10 10:13:57 -08:00
JP Simard e70710bedb Don't log if indentation isn't set in config
Fixes #1998
2018-01-10 10:08:39 -08:00
JP Simard 7ad77df690 release 0.24.1 2018-01-08 15:21:59 -08:00
Ornithologist Coder a2c8233d95 Ignores computed variables 2018-01-05 10:41:05 +01:00
Ornithologist Coder 561e10a71f Uses .setterAccessibility to differentiate variables from constant
As suggested by @marcelofabri.
2018-01-05 08:36:09 +01:00
Ornithologist Coder ecd8ac67b6 Fixes file name on header 2018-01-05 07:29:41 +01:00
Ornithologist Coder 2039ee6b7b Improves 'let' keyword validation 2018-01-05 06:48:54 +01:00
Ornithologist Coder 1295c5d182 Adds opt-in prefixed_toplevel_constant rule
Implements #1907.
2018-01-05 04:07:10 +01:00
JP Simard 34d2fb3949 Move Configuration.defaultIndentation() to IndentationStyle init 2018-01-03 23:31:12 -08:00
JP Simard fa13551af1 Rename Configuration.Indentation to IndentationStyle
and move to its own file
2018-01-03 23:21:23 -08:00
JP Simard 5fd67018bb Fix comment alignment 2018-01-03 23:16:37 -08:00
Noah McCann fa5815e9f5 Extracted rule logic to separate function to address linting errors 2018-01-03 23:05:48 -08:00
Noah McCann ab29b75d20 Addressed most linting errors 2018-01-03 23:05:48 -08:00
Noah McCann 093367073a Renamed IndentationMode to Indentation, better handled default value 2018-01-03 23:05:48 -08:00
Noah McCann 38f869bf81 Added indentationMode to configuration, updated parsing to handle it 2018-01-03 23:05:48 -08:00
Ornithologist Coder a3c6a7f40c Adds opt-in discouraged_object_literal rule
Implements #1987.
2018-01-03 23:00:54 -08:00
JP Simard 5966896575 Fix missing word in comment 2018-01-03 21:42:55 -08:00
Donald Ritter 1deddf2334 Adds a new rule which allows for enums that conform to protocol to
require cases.
2017-12-22 13:08:51 -05:00
JP Simard 1541f519b2 Merge pull request #1966 from joseprl89/feature/explicit_acl_rule
Add explicit acl rule to satisfy Issue #1649
2017-12-22 12:51:48 -05:00
JP Simard a9b6a6f07e Fix false positives in unused_closure_parameter rule
when closure is wrapped in parentheses. Fixes #1979.

Definitely not elegant, but it should help.
2017-12-21 17:52:06 -05:00
JP Simard c7c77f55ea Merge pull request #1965 from dirtydanee/yoda-condition
Introduction of Yoda condition checking.
2017-12-20 15:18:54 -05:00