Skip to content

Fix issues with analyzer rules, Xcode 12 & SwiftUI #3366

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

Merged
merged 1 commit into from
Sep 23, 2020

Conversation

jpsim
Copy link
Collaborator

@jpsim jpsim commented Sep 23, 2020

We weren't properly handling some new Xcode 12 compiler logs.

We also were marking declarations used by SwiftUI as unused (@main and preview providers).

Fixes #3365

We weren't properly handling some new Xcode 12 compiler logs.

We also were marking declarations used by SwiftUI as unused
(`@main` and preview providers).
@SwiftLintBot
Copy link

12 Messages
📖 Linting Aerial with this PR took 1.88s vs 1.88s on master (0% slower)
📖 Linting Alamofire with this PR took 2.68s vs 2.68s on master (0% slower)
📖 Linting Firefox with this PR took 9.21s vs 9.19s on master (0% slower)
📖 Linting Kickstarter with this PR took 15.38s vs 15.25s on master (0% slower)
📖 Linting Moya with this PR took 1.27s vs 1.31s on master (3% faster)
📖 Linting Nimble with this PR took 1.35s vs 1.36s on master (0% faster)
📖 Linting Quick with this PR took 0.62s vs 0.62s on master (0% slower)
📖 Linting Realm with this PR took 2.66s vs 2.68s on master (0% faster)
📖 Linting SourceKitten with this PR took 1.02s vs 1.04s on master (1% faster)
📖 Linting Sourcery with this PR took 7.1s vs 7.04s on master (0% slower)
📖 Linting Swift with this PR took 10.87s vs 10.86s on master (0% slower)
📖 Linting WordPress with this PR took 16.92s vs 16.91s on master (0% slower)

Generated by 🚫 Danger

@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2020

Codecov Report

Merging #3366 into master will increase coverage by 0.00%.
The diff coverage is 85.71%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3366   +/-   ##
=======================================
  Coverage   90.52%   90.53%           
=======================================
  Files         417      417           
  Lines       20493    20501    +8     
=======================================
+ Hits        18552    18560    +8     
  Misses       1941     1941           
Impacted Files Coverage Δ
...swiftlint/Helpers/CompilerArgumentsExtractor.swift 0.00% <0.00%> (ø)
...ntFramework/Rules/Lint/UnusedDeclarationRule.swift 88.02% <100.00%> (+1.06%) ⬆️
...tFramework/Rules/Lint/ValidIBInspectableRule.swift 98.64% <0.00%> (-1.36%) ⬇️
...LintFramework/Extensions/SwiftLintFile+Regex.swift 97.20% <0.00%> (+0.46%) ⬆️
...ftLintFramework/Rules/Lint/PrivateOutletRule.swift 100.00% <0.00%> (+3.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ff2938...9e1fafb. Read the comment docs.

@jpsim jpsim marked this pull request as ready for review September 23, 2020 14:15
@jpsim jpsim merged commit 2731f99 into master Sep 23, 2020
@jpsim jpsim deleted the fix-issues-with-analyzer-rules-xcode-12--swiftui branch September 23, 2020 14:15
kateinoigakukun added a commit to kateinoigakukun/periphery that referenced this pull request Oct 3, 2020
kateinoigakukun added a commit to peripheryapp/periphery that referenced this pull request Oct 3, 2020
* Update SourceKitten

* Fix Xcode12 compiler arguments issue

Reference: realm/SwiftLint#3366

* Update SwiftSyntax for 5.3

* Fix compile target test case to match latest SwiftPM behavior

The latest SwiftPM generate a xcodeproj target for test target and it
doesn't inherit deployment target from main product deployment target
version.
optionalendeavors added a commit to optionalendeavors/SwiftLint that referenced this pull request Oct 4, 2020
* master-upstream: (98 commits)
  Fix some false positives in rule `explicit_self` (realm#3368)
  Update SourceKitten to 0.30.1 (realm#3367)
  Fix issues with analyzer rules, Xcode 12 & SwiftUI (realm#3366)
  Add empty changelog section
  release 0.40.3
  Fix false positives for 'multiple_closures_with_trailing_closure' (realm#3353)
  [UnusedDeclarationRule] Work around SR-11985 (realm#3363)
  Revert "Fix finding the nested config when a single file path is passed (realm#3342)" (realm#3362)
  [CONTRIBUTING] Add building & running tips (realm#3360)
  Fix finding the nested config when a single file path is passed (realm#3342)
  Include Linux zip in list of GitHub release binaries (realm#3350)
  [UnusedDeclarationRule] Add more tests (realm#3359)
  Test CI with official Swift 5.3 release (realm#3356)
  Don't mark `@NSApplicationMain` or `@UIApplicationMain` classes as unused (realm#3355)
  [Fix] `UnusedCaptureListRule`: implicit self in @escaping closures (realm#3352)
  Skip correcting files with parser diagnostics (realm#3349)
  [SwiftLintFile] Remove lock in favor of UUID (realm#3347)
  [UnusedDeclarationRule] Speed up and detect more dead code (realm#3340)
  Add empty changelog section
  release 0.40.2
  ...

# Conflicts:
#	Source/swiftlint/Helpers/LintableFilesVisitor.swift
optionalendeavors added a commit to optionalendeavors/SwiftLint that referenced this pull request Oct 4, 2020
* master: (98 commits)
  Fix some false positives in rule `explicit_self` (realm#3368)
  Update SourceKitten to 0.30.1 (realm#3367)
  Fix issues with analyzer rules, Xcode 12 & SwiftUI (realm#3366)
  Add empty changelog section
  release 0.40.3
  Fix false positives for 'multiple_closures_with_trailing_closure' (realm#3353)
  [UnusedDeclarationRule] Work around SR-11985 (realm#3363)
  Revert "Fix finding the nested config when a single file path is passed (realm#3342)" (realm#3362)
  [CONTRIBUTING] Add building & running tips (realm#3360)
  Fix finding the nested config when a single file path is passed (realm#3342)
  Include Linux zip in list of GitHub release binaries (realm#3350)
  [UnusedDeclarationRule] Add more tests (realm#3359)
  Test CI with official Swift 5.3 release (realm#3356)
  Don't mark `@NSApplicationMain` or `@UIApplicationMain` classes as unused (realm#3355)
  [Fix] `UnusedCaptureListRule`: implicit self in @escaping closures (realm#3352)
  Skip correcting files with parser diagnostics (realm#3349)
  [SwiftLintFile] Remove lock in favor of UUID (realm#3347)
  [UnusedDeclarationRule] Speed up and detect more dead code (realm#3340)
  Add empty changelog section
  release 0.40.2
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not get cursor info - Analyze error (with Xcode 12)
3 participants