Commit Graph

159 Commits

Author SHA1 Message Date
Marcelo Fabri 23a0b03fe8 Fixing violations 2016-12-19 21:20:58 -02:00
Marcelo Fabri 3f6ca7611a Fix violations 2016-12-19 20:08:17 -02:00
Marcelo Fabri e854701fb2 Refactoring shared code 2016-12-15 19:57:49 -02:00
Fabian Ehrentraud 2f8c54d3c7 uppercase XML 2016-12-13 12:33:05 -08:00
Fabian Ehrentraud 96aa86b500 moved String+XML.swift to Extensions folder and fixed header comment 2016-12-13 12:33:05 -08:00
JP Simard 8b49cd36b5 Merge pull request #967 from marcelofabri/void-return-rule
Void return rule
2016-12-13 12:04:01 -08:00
JP Simard 3f7c010be8 fix specifying multiple rule identifiers in comment commands 2016-12-13 08:55:05 -08:00
Marcelo Fabri 7af7eb8fbe Handling curried declarations 2016-12-13 11:57:43 -02:00
Marcelo Fabri 1351fdb643 Fix violations for void_return rule 2016-12-13 10:41:08 -02:00
JP Simard 11bfa938ae Merge pull request #960 from marcelofabri/closure_parameter_position
Add closure_parameter_position rule
2016-12-13 01:33:00 -08:00
Marcelo Fabri 5359582782 Refactoring SwiftExpressionKind 2016-12-12 22:27:46 -02:00
Marcelo Fabri a48097103a Add closure_parameter_position rule
Fixes #931
2016-12-12 21:12:45 -02:00
Marcelo Fabri 9c43a21fed Merge branch 'master' into attributes-rule 2016-12-11 23:46:18 -02:00
JP Simard 8c171458f8 make QueuedPrint.swift compile on Linux
by adding an explicit `import Dispatch` and disabling the `atexit_b` call
on Linux. This just means that we won't be able to guarantee that the print()
buffer will have been flushed at program exit. Hopefully this doesn't
cause too many issues.
2016-12-11 14:04:49 -08:00
JP Simard 876aa26a1d add type aliases for NSRegularExpression and NSTextCheckingResult
to align Linux and Darwing code.
2016-12-11 14:04:49 -08:00
JP Simard da1d0ba876 make FileManager.filesToLintAtPath(_:) compile on Linux
by addressing differences in FileManager APIs on Linux and Darwin
2016-12-11 14:04:49 -08:00
JP Simard 31814c36c4 set result of two methods to _ to avoid warnings on Linux
also filed https://github.com/apple/swift-corelibs-foundation/pull/740
and https://github.com/apple/swift-corelibs-foundation/pull/741

to fix upstream
2016-12-11 14:04:49 -08:00
JP Simard 0faf567931 use bridge() rather than explict or implicit casts
this is a step in aligning the code to compile on both Darwin and
Linux
2016-12-11 13:47:44 -08:00
Daniel Duan 00bfe3c77e abstract attribute retrieval from SourceKit
Extracting attribute values enclosed in SourcKit dictionary is common enough to
warrant a utility function.
2016-12-11 01:51:33 -08:00
Marcelo Fabri 0afe9a8b19 Enabling more rules in SwiftLint itself 2016-12-10 19:12:40 -02:00
Marcelo Fabri 2ddf7757d7 Merge branch 'master' into attributes-rule 2016-12-09 14:50:48 -02:00
Marcelo Fabri 13b0cfe623 Fixing inconsistencies 2016-12-08 18:29:57 -02:00
JP Simard a57526d639 omit 'self.' references when not ambiguous 2016-12-08 01:25:54 -08:00
JP Simard b409a056e5 refactor Array.unique and Array.group(by:) 2016-12-07 23:26:43 -08:00
Michał Kałużny d97632e52d Add human readable reporter that’s also funny because emoji. 2016-12-07 23:13:59 -08:00
Marcelo Fabri 1d42d29714 Merge branch 'master' into attributes-rule 2016-12-04 18:36:06 -02:00
Marcelo Fabri 0c018a15c7 Swift 3 migration 2016-12-04 18:19:44 -02:00
JP Simard 19fad01b29 make all enum members lowercase to comply with Swift 3 API Guidelines 2016-12-01 22:16:21 -08:00
JP Simard 0b481f1e16 change Array.arrayOf(_:) to Array.array(of:) 2016-12-01 18:09:38 -08:00
JP Simard 39e1001629 make lots of Swift 3 related changes
many of which are to help with otherwise very long compile times
2016-12-01 00:34:29 -08:00
Marcelo Fabri af15654ddc Moving functionKinds and typeKinds to extension 2016-11-30 11:51:25 -02:00
Norio Nomura 363bcf5c73 Merge branch 'master' into swift3.0
* master:
  add empty changelog section
  update Releasing.md with `brew bump-formula-pr`
  0.13.1: Heavy Cycle
  remove unused function dictFromKeyValuePairs
  add tests for reporterFromString(_:)
  small refactoring of SwitchCaseOnNewlineRule.swift

# Conflicts:
#	Source/SwiftLintFramework/Extensions/File+Cache.swift
#	Source/SwiftLintFramework/Rules/SwitchCaseOnNewlineRule.swift
2016-11-30 22:33:16 +09:00
Norio Nomura 48b25b6aab Merge commit '83830861d6c6b7fee3218461f699c7d3b457bf2a' into swift3.0
* commit '83830861d6c6b7fee3218461f699c7d3b457bf2a':
  refactor isPrivateLevel(identifier:)
  refactor nameStrippingLeadingUnderscoreIfPrivate
  combine changelog entries for #781 and #831
  Add support for filePrivate and open in rules

# Conflicts:
#	Source/SwiftLintFramework/Extensions/String+SwiftLint.swift
#	Source/SwiftLintFramework/Rules/MissingDocsRule.swift
2016-11-30 20:16:47 +09:00
Norio Nomura 7c12a63e8f Merge commit '58eb0f69c4055bb2cb89b3df278eca6ce0fb1c34' into swift3.0
* commit '58eb0f69c4055bb2cb89b3df278eca6ce0fb1c34':
  generally clean up usage of swiftlint comment commands
  update README to reflect the ability to specify multiple rules in commands
  add changelog entry
  allow specifying multiple rule identifiers in comment commands

# Conflicts:
#	Source/SwiftLintFramework/Extensions/NSRegularExpression+SwiftLint.swift
#	Source/SwiftLintFramework/Models/Command.swift
#	Source/SwiftLintFramework/Rules/LegacyNSGeometryFunctionsRule.swift
#	Tests/SwiftLintFrameworkTests/ConfigurationTests.swift
#	Tests/SwiftLintFrameworkTests/IntegrationTests.swift
2016-11-30 18:42:40 +09:00
Norio Nomura 636efb5b14 Merge commit 'aeb5d7ae442d6b590e7693a7214098a9328f951a' into swift3.0
* commit 'aeb5d7ae442d6b590e7693a7214098a9328f951a':
  Updating changelog
  Updating regex after PR feedback
  Adding SyntacticSugar rule

# Conflicts:
#	Source/SwiftLintFramework/Extensions/File+Cache.swift
2016-11-30 18:10:10 +09:00
Norio Nomura ee638ef428 Merge commit '20870e7ab140e39dbe426feb322e8b02c7cfc993' into swift3.0
* commit '20870e7ab140e39dbe426feb322e8b02c7cfc993':
  fix single file usage: `swiftlint lint --path File.swift`

# Conflicts:
#	Source/SwiftLintFramework/Extensions/NSFileManager+SwiftLint.swift
#	Source/SwiftLintFramework/Models/Configuration.swift
#	Tests/SwiftLintFrameworkTests/ConfigurationTests.swift
2016-11-30 14:04:45 +09:00
JP Simard 2b1a3fab88 remove unused function dictFromKeyValuePairs 2016-11-28 23:12:54 -08:00
JP Simard 0999f6a24b refactor nameStrippingLeadingUnderscoreIfPrivate 2016-11-28 21:48:25 -08:00
Marcelo Fabri fd71465cd2 Add support for filePrivate and open in rules
Fixes #781 and #831
2016-11-27 16:26:41 -02:00
JP Simard e93eee31e7 generally clean up usage of swiftlint comment commands
used within the codebase itself.
2016-11-25 13:10:38 -08:00
JP Simard 639a18181c allow specifying multiple rule identifiers in comment commands 2016-11-25 12:56:48 -08:00
Marcelo Fabri c4b960000d Adding SyntacticSugar rule 2016-11-25 12:25:10 -08:00
JP Simard 3568245c19 fix single file usage: swiftlint lint --path File.swift 2016-11-23 17:13:22 -08:00
Norio Nomura b521ae6a60 Pass UnicodeScalar to CharacterSet.contains()
Fix crash in `hasTrailingWhitespace()` when trailing character is Emoji.
2016-11-08 21:45:04 +09:00
Norio Nomura df28dcfc13 Update YamlSwift to 3.1.0 2016-11-08 19:29:11 +09:00
Norio Nomura 40828dff03 Merge branch 'master' into swift3.0
* master: (41 commits)
  Fix formatting in CHANGELOG.md
  release 0.13.0
  Update CHANGELOG.md
  Fix check for trailing whitespace to return early
  Fix checks for some inline comments
  Replace check for comments to use SyntaxKind
  Add configuration for trailing_whitespace to ignore comments
  Unwanted space removed
  - Lint issues fixed
  Updated HTML Reporter
  PR feedback
  Add check on autocorrect for disabled range
  Use `utf8.count` instead of `utf16.count` to byte range
  Re-write `ExplicitInitRule` to `ASTRule`
  added ExplicitInitRule
  Updated CHANGELOG
  HTML Reporter added
  HTML Reporter added
  Adds information about SwiftLint plugin for AppCode into README.md
  added reasons why a new rule should be opt in
  ...

# Conflicts:
#	Source/SwiftLintFramework/Extensions/File+SwiftLint.swift
#	Source/SwiftLintFramework/Extensions/Structure+SwiftLint.swift
#	Source/SwiftLintFramework/Rules/ColonRule.swift
#	Source/SwiftLintFramework/Rules/CommaRule.swift
#	Source/SwiftLintFramework/Rules/LegacyCGGeometryFunctionsRule.swift
#	Source/SwiftLintFramework/Rules/LegacyConstantRule.swift
#	Source/SwiftLintFramework/Rules/LegacyConstructorRule.swift
#	Source/SwiftLintFramework/Rules/LegacyNSGeometryFunctionsRule.swift
#	Source/SwiftLintFramework/Rules/LineLengthRule.swift
#	Source/SwiftLintFramework/Rules/OperatorFunctionWhitespaceRule.swift
#	Source/SwiftLintFramework/Rules/ReturnArrowWhitespaceRule.swift
#	Source/SwiftLintFramework/Rules/RuleConfigurations/StatementPositionConfiguration.swift
#	Source/SwiftLintFramework/Rules/StatementPositionRule.swift
#	Source/SwiftLintFramework/Rules/TrailingWhitespaceRule.swift
#	Tests/SwiftLintFramework/RuleConfigurationTests.swift
2016-11-04 21:40:56 +09:00
Norio Nomura 3ff76e7ce8 Update SourceKitten 2016-11-04 20:24:21 +09:00
Norio Nomura 21e3439bfa Merge pull request #766 from masters3d/no-autocorrect-disabled-rules
Added disable rule test to autocorrect
2016-10-29 14:09:11 +09:00
Norio Nomura c16efa15fb Merge pull request #807 from masters3d/closure-spacing
added closure-spacing-rule
2016-10-24 19:30:13 +09:00
Norio Nomura ec3f9d0c94 Fix line_length style violations, unused warnings 2016-10-13 22:40:45 +09:00