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

Added possibility to make lint fail if using wrong version #2427

Closed
wants to merge 85 commits into from
Closed

Added possibility to make lint fail if using wrong version #2427

wants to merge 85 commits into from

Commits on Sep 17, 2018

  1. Configuration menu
    Copy the full SHA
    1f121b1 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2018

  1. Add random rule

    yhkaplan committed Sep 26, 2018
    Configuration menu
    Copy the full SHA
    71b6def View commit details
    Browse the repository at this point in the history
  2. Add tests

    yhkaplan committed Sep 26, 2018
    Configuration menu
    Copy the full SHA
    6cf052d View commit details
    Browse the repository at this point in the history
  3. Add documentation

    yhkaplan committed Sep 26, 2018
    Configuration menu
    Copy the full SHA
    d40889f View commit details
    Browse the repository at this point in the history
  4. Add to changelog

    yhkaplan committed Sep 26, 2018
    Configuration menu
    Copy the full SHA
    4f6f667 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2018

  1. Configuration menu
    Copy the full SHA
    1cedd0c View commit details
    Browse the repository at this point in the history
  2. Delete unneeded todo

    yhkaplan committed Sep 27, 2018
    Configuration menu
    Copy the full SHA
    9acf8ba View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2018

  1. Configuration menu
    Copy the full SHA
    b0ddef9 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2018

  1. Configuration menu
    Copy the full SHA
    3d6030d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b173350 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2018

  1. Configuration menu
    Copy the full SHA
    5bf50c8 View commit details
    Browse the repository at this point in the history
  2. #2422 - Add CompilerProtocolInitRule violation unit test for Expressi…

    …bleByIntegerLiteral protocol
    Timofey Solonin committed Oct 1, 2018
    Configuration menu
    Copy the full SHA
    2cc4dca View commit details
    Browse the repository at this point in the history
  3. #2422 - Fix CI

    Timofey Solonin committed Oct 1, 2018
    Configuration menu
    Copy the full SHA
    3189d17 View commit details
    Browse the repository at this point in the history
  4. #2422 - Replace ruleDescription change with a StyleViolation reason f…

    …ield in CompilerProtocolInitRule
    Timofey Solonin committed Oct 1, 2018
    Configuration menu
    Copy the full SHA
    22be71e View commit details
    Browse the repository at this point in the history
  5. #2422 - Add changelog entry

    Timofey Solonin committed Oct 1, 2018
    Configuration menu
    Copy the full SHA
    78ebad7 View commit details
    Browse the repository at this point in the history
  6. #2422 - Fix changelog

    Timofey Solonin committed Oct 1, 2018
    Configuration menu
    Copy the full SHA
    1b71ae7 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2018

  1. Merge pull request #2428 from biboran/compiler-protocol-init-description

    #2422 - Specify which literal rule was violated for CompilerProtocolInitRule
    marcelofabri authored Oct 2, 2018
    Configuration menu
    Copy the full SHA
    5bcaa61 View commit details
    Browse the repository at this point in the history
  2. #2423 - Fix EmptyCountRule for binary, octal and hexadecimal integer …

    …literals
    Timofey Solonin committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    e9d2552 View commit details
    Browse the repository at this point in the history
  3. #2423 - Update changelog

    Timofey Solonin committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    e51646a View commit details
    Browse the repository at this point in the history
  4. #2423 - Update documentation

    Timofey Solonin committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    21cd4e0 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #2430 from biboran/empty-count-fix

    #2423 - Fix EmptyCountRule for binary, octal and hexadecimal integer literals
    marcelofabri authored Oct 2, 2018
    Configuration menu
    Copy the full SHA
    34f513a View commit details
    Browse the repository at this point in the history
  6. Merge pull request #2407 from marcelofabri/enable-static-operator

    Enable static_operator opt-in rule in SwiftLint
    marcelofabri authored Oct 2, 2018
    Configuration menu
    Copy the full SHA
    2c59827 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2018

  1. Configuration menu
    Copy the full SHA
    6eda139 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8b12806 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d40cfc0 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2018

  1. Configuration menu
    Copy the full SHA
    a3031aa View commit details
    Browse the repository at this point in the history
  2. Set is more efficient

    yhkaplan committed Oct 14, 2018
    Configuration menu
    Copy the full SHA
    1adb275 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    44b57de View commit details
    Browse the repository at this point in the history
  4. Merge pull request #2419 from yhkaplan/random

    New Rule - Legacy Random
    marcelofabri authored Oct 14, 2018
    Configuration menu
    Copy the full SHA
    83a2ca4 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2018

  1. Update CircleCI jobs to Xcode 10.1 where possible (#2462)

    Update CircleCI jobs to Xcode 10.1 where possible
    
    And fix changelog formatting
    jpsim authored Nov 14, 2018
    Configuration menu
    Copy the full SHA
    8966d86 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    09cb3ba View commit details
    Browse the repository at this point in the history
  3. Fix readme badge

    We moved to CircleCI a looooooooong time ago
    jpsim committed Nov 14, 2018
    Configuration menu
    Copy the full SHA
    27714d9 View commit details
    Browse the repository at this point in the history
  4. release 0.28.0

    jpsim committed Nov 14, 2018
    Configuration menu
    Copy the full SHA
    94dd8b4 View commit details
    Browse the repository at this point in the history
  5. Add empty changelog section

    jpsim authored Nov 14, 2018
    Configuration menu
    Copy the full SHA
    cb38f86 View commit details
    Browse the repository at this point in the history
  6. Add enhancements section

    jpsim authored Nov 14, 2018
    Configuration menu
    Copy the full SHA
    64fdb99 View commit details
    Browse the repository at this point in the history
  7. Publish with Swift 4.2

    jpsim committed Nov 14, 2018
    Configuration menu
    Copy the full SHA
    30808b1 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2018

  1. Improve performance of collecting files to lint and lint cache lookups (

    #2465)
    
    Performance has gotten pretty bad for complex SwiftLint configurations like the one used for Lyft's iOS code base involving lots of files in the directories being linted, large configuration files and many nested configuration files.
    
    Two main areas were particularly ripe for improvement were:
    
    1. Collecting which files to lint
    2. Lint cache lookups
    
    ### Collecting which files to lint
    
    Improve this by:
    
    * using an NSOrderedSet to remove excluded paths instead of `Array.filter`
    * parallelizing calls to `filesToLint` for all paths to lint and exclude
    * using `FileManager.subpaths(atPath:)` instead of `enumerator(atPath:)`
    
    |Change|Before|After|Speed up|
    |-|-|-|-|
    |NSOrderedSet|2.438s|0.917s|2.659x|
    |Parallel Flat Map|2.438s|2.248s|1.085x|
    |Subpaths|0.939s|0.867s|1.083x|
    |**Total**|**2.438s**|**0.720s**|**3.386x**|
    
    ### Lint cache lookups
    
    By using an MD5 hash of the Configuration description from CryptoSwift as the cache key instead of instead the full description, we can drastically speed up cache lookups for projects with complex SwiftLint configurations. I think the dictionary lookup for very large string keys doesn't perform very well.
    
    ---
    
    * Speed up Configuration.lintablePaths
    
    * Improve cache lookup performance by up to 10x
    
    By using an MD5 hash of the Configuration description from CryptoSwift
    as the cache key instead of instead the full description.
    
    * Add changelog entries
    
    * Swift 4.0 & Linux compatibility
    
    * os(Darwin) isn't a thing
    
    * Allow warnings in pod lib lint
    
    SwiftLint supports building with Swift 4.0 to 4.2.
    
    There is no version of CryptoSwift to support both Swift 4.0 and
    Swift 4.2.
    
    So allow warnings for now. We'll make one more Swift 4.0 compatible
    release, then we'll bump the build requirements to Swift 4.2 and
    remove the `--allow-warnings` flag.
    jpsim authored Nov 18, 2018
    1 Configuration menu
    Copy the full SHA
    d768897 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    99db159 View commit details
    Browse the repository at this point in the history
  3. release 0.28.1

    jpsim committed Nov 18, 2018
    Configuration menu
    Copy the full SHA
    4955c17 View commit details
    Browse the repository at this point in the history
  4. Add empty changelog section

    jpsim committed Nov 18, 2018
    Configuration menu
    Copy the full SHA
    265b4fd View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2018

  1. Require Swift 4.2 (#2466)

    This bumps the minimum version required to build SwiftLint to 4.2. The primary motivating factor to drop support for Swift 4.0-4.1.x is that SwiftLint now uses CryptoSwift, which requires 4.2.
    
    * Add changelog entry
    
    * Remove --allow-warnings flag from CocoaPods commands
    
    * Update CryptoSwift to 0.13.0
    
    * Migrate to Swift 4.2
    
    * Remove CircleCI tests for Swift < 4.2
    
    * Update English and Chinese README
    
    Korean README doesn't yet have a version table like this.
    
    * Update gems
    
    * Add changelog entry for fixed compiler warnings
    
    * Update CocoaPods to 1.6.0.beta.2
    
    To work around CocoaPods/CocoaPods#7708
    jpsim authored Nov 19, 2018
    Configuration menu
    Copy the full SHA
    5901d30 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cf0c7b7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d744ac5 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2018

  1. Add back MARK

    marcelofabri committed Nov 20, 2018
    Configuration menu
    Copy the full SHA
    fb9d8df View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2469 from marcelofabri/use-default-equatable-impl…

    …ementation
    
    Use default Equatable and Hashable implementations
    marcelofabri authored Nov 20, 2018
    Configuration menu
    Copy the full SHA
    d1dbc31 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2018

  1. Configuration menu
    Copy the full SHA
    9363a3a View commit details
    Browse the repository at this point in the history
  2. Set .swift-version to 4.2.1

    jpsim committed Nov 21, 2018
    Configuration menu
    Copy the full SHA
    b9dc20c View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2018

  1. Use CommonCrypto if available to compute MD5 hash (#2474)

    It's significantly faster than CryptoSwift: 3% vs 19% of cached lint time for Lyft's iOS codebase.
    
    ### Before (CryptoSwift)
    
    ![CryptoSwift](https://user-images.githubusercontent.com/474794/48873531-3f2a7780-eda3-11e8-9cd9-c0ef796b061b.png)
    
    ### After (CommonCrypto)
    
    ![CommonCrypto](https://user-images.githubusercontent.com/474794/48873539-481b4900-eda3-11e8-8605-4fd009da3eb1.png)
    jpsim authored Nov 22, 2018
    Configuration menu
    Copy the full SHA
    db2fbad View commit details
    Browse the repository at this point in the history
  2. Add SWIFTLINT_DISABLE_SOURCEKIT environment variable (#2473)

    This can be used for avoid "Test::Unit::AssertionFailedError" error in `libxpc.dylib` on calling `sourcekitd_send_request_sync` in sandbox environment.
    norio-nomura authored and jpsim committed Nov 22, 2018
    Configuration menu
    Copy the full SHA
    ea171fb View commit details
    Browse the repository at this point in the history
  3. Parallelize iterating over subpaths (#2475)

    This has a very small performance improvement on multi-core machines
    jpsim authored Nov 22, 2018
    Configuration menu
    Copy the full SHA
    d1109da View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2018

  1. #2471 - Fix false positive toggle_bool (#2479)

    * #2471 - Fix false positive toggle_bool by using negative lookbehind on dot and word character
    
    * #2471 - Update changelog
    abdulowork authored and jpsim committed Nov 24, 2018
    Configuration menu
    Copy the full SHA
    9a216e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4f64fc2 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2018

  1. Configuration menu
    Copy the full SHA
    f135617 View commit details
    Browse the repository at this point in the history
  2. Pass '--sanitize=thread' for tsan CI job (#2482)

    Now that we require Swift 4.2, we can use this.
    jpsim authored Nov 25, 2018
    Configuration menu
    Copy the full SHA
    4f8838a View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2018

  1. Configuration menu
    Copy the full SHA
    45dd66b View commit details
    Browse the repository at this point in the history
  2. Fix false positives for explicit_init when passing init as closure …

    …in multiline call (#2478)
    
    * Ignore calls with `(` before .init
    
    * Update rules documentation
    
    * Update CHANGELOG.md
    
    * Change multi-line string to single-line with explicit newlines
    dominicfreeston authored and jpsim committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    e962440 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f220e03 View commit details
    Browse the repository at this point in the history
  4. Fix false positive on file_name rule with specific patterns (#2418)

    * Add false positive failing test to file_name rule
    
    * Fix false positive in file_name rule
    
    * Add changelog entry
    
    * Use correct name in changelog
    Jeehut authored and jpsim committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    7ac9efa View commit details
    Browse the repository at this point in the history
  5. Fix changelog entry position

    jpsim committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    4893c2d View commit details
    Browse the repository at this point in the history
  6. Update SourceKitten to 0.22.0

    jpsim committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    fad2a85 View commit details
    Browse the repository at this point in the history
  7. release 0.28.2

    jpsim committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    b64ead1 View commit details
    Browse the repository at this point in the history
  8. Add testSimulateHomebrewTest() to IntegrationTests

    Motivation:
    
    Sometimes, Homebrew bottling CI fails because it runs in the sandbox.
    
    Modifications:
    
    Add `testSimulateHomebrewTest()` to `IntegrationTests` that simulates test in `homebrew-core/Formula/swiftlint.rb` within sandbox.
    
    Result:
    
    Confirm that a test equivalent to `brew test swiftlint` will pass in the sandbox before publishing to homebrew.
    norio-nomura authored and jpsim committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    efea1b7 View commit details
    Browse the repository at this point in the history
  9. Minor stylistic edits for homebrew integration tests

    also fixup Package.resolved and BoolExtensionTests
    jpsim committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    f6a1618 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    827410a View commit details
    Browse the repository at this point in the history
  11. Add markdown reporter (#2486)

    madcato authored and jpsim committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    b58c4e3 View commit details
    Browse the repository at this point in the history
  12. Fix changelog entry position

    jpsim committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    64c0b96 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a944808 View commit details
    Browse the repository at this point in the history
  14. 4 Configuration menu
    Copy the full SHA
    068d785 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    d83143b View commit details
    Browse the repository at this point in the history
  16. release 0.29.0

    jpsim committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    8fc75e3 View commit details
    Browse the repository at this point in the history
  17. Add empty changelog section

    jpsim committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    f44d07d View commit details
    Browse the repository at this point in the history
  18. Style nits

    jpsim committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    60afab8 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2018

  1. Add "Redundant @objc Attribute" Rule (#2270)

    dirtydanee authored and jpsim committed Nov 28, 2018
    Configuration menu
    Copy the full SHA
    c4e2a38 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    85b61e7 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2490 from marcelofabri/bugfix-2489

    Fix false positive in nimble_operator rule
    marcelofabri authored Nov 28, 2018
    Configuration menu
    Copy the full SHA
    8f8cf84 View commit details
    Browse the repository at this point in the history
  4. Vertical whitespace between cases (#2292)

    Jeehut authored and jpsim committed Nov 28, 2018
    Configuration menu
    Copy the full SHA
    9d47c34 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    38b0114 View commit details
    Browse the repository at this point in the history
  6. Multiline Brackets (#2302)

    * Add new multiline_literal_brackets rule with examples
    
    * Implement rule
    
    * Add changelog entry
    
    * Fix CHANGELOG and rule name
    
    * Fix tests + Update stuff after rebasing
    
    * Add more examples & fix whitespace issue
    
    * Address feedback from @ornithocoder
    
    * Add multiline rules for arguments and parameters
    
    * Fix false positives in rule multiline_parameters_brackets
    
    * Fix false positive for trailing closures in multiline_arguments_brackets
    
    * Add nested examples to rule multiline_arguments_brackets
    
    * Fix more false positives in multiline_arguments_brackets rule
    
    * Use guard where appropriate instead of if
    
    * Update generated artifacts after rebase
    
    * Add CHANGELOG entry for all three new rules
    
    * Move changelog entries to new version
    
    * Fix changelog entries position
    
    * Move new rules to correct subfolder
    
    * Update Rules.md file contents
    
    * Fixup changelog
    
    * Refactor rules
    Jeehut authored and jpsim committed Nov 28, 2018
    Configuration menu
    Copy the full SHA
    cf034c9 View commit details
    Browse the repository at this point in the history
  7. Only mark custom rules as enabled in your config when custom rules ar…

    …e configured.
    Jim Hildensperger authored and jpsim committed Nov 28, 2018
    Configuration menu
    Copy the full SHA
    c3d72c2 View commit details
    Browse the repository at this point in the history
  8. Fix changelog entry position

    jpsim committed Nov 28, 2018
    Configuration menu
    Copy the full SHA
    b66446c View commit details
    Browse the repository at this point in the history
  9. #2435 - Make modifier_order rule rely on an explicit set of rules (#2458

    )
    
    * #2435 - Adjust modifier_order rule to require explicit modifier order specified to conclude a violation
    
    * #2435 - Move modifier order rule examples to a separate file
    
    * #2435 - Add modifier interference tests
    
    * #2435 - Fix whitespaces
    
    * Minor edits
    
    * Add changelog entry
    abdulowork authored and jpsim committed Nov 28, 2018
    Configuration menu
    Copy the full SHA
    efa6817 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2018

  1. Configuration menu
    Copy the full SHA
    0962709 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ff10887 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    af14621 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'swiftlint-version-failable' of https://github.com/kimdv…

    …/SwiftLint into swiftlint-version-failable
    kimdv committed Nov 29, 2018
    Configuration menu
    Copy the full SHA
    abfdf43 View commit details
    Browse the repository at this point in the history