MessageKit v2.0.0 fails to lint during cartage build

Created on 8 Apr 2019  路  9Comments  路  Source: MessageKit/MessageKit

  • What version of MessageKit are you using?
    Tag 2.0.0

  • What version of iOS are you running on?
    xcodebuild -version
    Xcode 10.2
    Build version 10E125
    carthage version
    0.33.0
    swiftlint version
    0.31.0

  • Is the issue you're experiencing reproducable in the example app?
    carthage update --use-submodules --cache-builds --platform iOS

Build fails due to swiftlint errors, here are some examples:

Linting 'MessageReusableView.swift' (36/49)
/Carthage/Checkouts/MessageKit/Sources/Controllers/MessagesViewController+Menu.swift:28:1: error: Explicit ACL Violation: All declarations should specify Access Control Level keywords explicitly. (explicit_acl)
/Carthage/Checkouts/MessageKit/Sources/Controllers/MessagesViewController+Menu.swift:28:1: error: Explicit Top Level ACL Violation: Top-level declarations should specify Access Control Level keywords explicitly. (explicit_top_level_acl)

Linting 'CGRect+Extensions.swift' (25/49)
/Carthage/Checkouts/MessageKit/Sources/Extensions/UIEdgeInsets+Extensions.swift:27:1: error: Explicit ACL Violation: All declarations should specify Access Control Level keywords explicitly. (explicit_acl)

confirmed bug

All 9 comments

1027

Sent with GitHawk

Is it fixed in the beta release?

Sent with GitHawk

Thanks for the PR mention, haven't seen that

2.0.0 beta fails with explicit_top_level_acl

* Checking out MessageKit at "2.0.0-beta.1"
*
Checking out MessageInputBar at "0.4.0"

2.0.0 fails with explicit_top_level_acl

* Checking out MessageInputBar at "0.4.0"
*
Checking out MessageKit at "2.0.0"

3.0.0 beta fails with explicit_top_level_acl

* Checking out MessageKit at "3.0.0-beta-swift4-2"
*
Checking out InputBarAccessoryView at "4.2.1"

I think you should put /Carthage in your ignore for Swiftlint for now. I use Cocoapods so sorry for not catching this. But in any case I don't think you should worry about lintint frameworks in your project

Sent with GitHawk

Carthage of course is in the excluded section of .swiftlint in my project. The problem occurs when building the project itself using carthage update. It's using the .swiftlint of the MessageKit project at the specified tag. My solution at the moment if to disable swiftlint from my current shell, by removing it from the PATH for example.

Same problem here as described by @Drusy

Ok, I will fix this ASAP!

Sent with GitHawk

@Drusy should be fixed on the development branch now

I still hit lint issues when pointing to development when building with Carthage.

It might be easier to skip running the lint phase during Carthage builds over trying to fix the lint issues people might be running into. In my project, my lint build phase looks like:

if [ -z "$CARTHAGE" ]
then
    swift run swiftlint --path .. --strict --quiet
fi

If $CARTHAGE isn't set, we run swiftlint, otherwise we skip it.

https://github.com/instacart/Nantes/blob/master/Nantes/Nantes.xcodeproj/project.pbxproj#L217

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asn111 picture asn111  路  3Comments

yspreen picture yspreen  路  3Comments

Abacaxi-Nelson picture Abacaxi-Nelson  路  4Comments

bilaalrashid picture bilaalrashid  路  3Comments

ahmedwasil picture ahmedwasil  路  3Comments