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

0.24.0 issues with folder names #1948

Closed
2 tasks done
123kyky opened this issue Nov 15, 2017 · 4 comments
Closed
2 tasks done

0.24.0 issues with folder names #1948

123kyky opened this issue Nov 15, 2017 · 4 comments
Labels
bug Unexpected and reproducible misbehavior.

Comments

@123kyky
Copy link

123kyky commented Nov 15, 2017

New Issue Checklist

Bug Report

Complete output when running SwiftLint, including the stack trace and command used

Partial output, sorry. Full output is huge

Linting 'GRMustache.swift' (96/858)
error opening input file 'path/.../GRMustache.swift' (Is a directory)
Most rules will be skipped because sourcekitd has failed.
Linting 'ViewController.swift' (97/858)
Linting 'AppDelegate.swift' (98/858)
Linting 'OSXTests.swift' (99/858)
Linting 'iOSTests.swift' (100/858)
Linting 'ViewController.swift' (101/858)
Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=257 "The file “GRMustache.swift” couldn’t be opened because you don’t have permission to view it." UserInfo={NSFilePath=path/.../GRMustache.swift, NSUnderlyingError=0x7f90e4299ff0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-900.0.69.2/src/swift/stdlib/public/core/ErrorType.swift, line 181
Illegal instruction: 4

Environment

0.24.0
homebrew

Pulled from config

excluded:
  - GRMustache.swift
  - MKCommon/Theming/Fonts/FontAwesome.swift

Latest xcode 9 build
No example, sorry

My report

It appears that swift lint is ignoring some folders now in the excluded config because of the directory name containing a "."
For example:
GRMustache.swift/
FontAwesome.swift/

It looks like swiftlint is having trouble opening this directory because its treating it as a file anyway, though it appears that my exclusion in our config file is being ignored. Anyone else experiencing this as of updating?

@marcelofabri
Copy link
Collaborator

marcelofabri commented Nov 28, 2017

Can you please provide a sample project/example to make it easier to test? Thanks!

@marcelofabri marcelofabri added the bug Unexpected and reproducible misbehavior. label Nov 28, 2017
@jerekapyaho
Copy link

Just stumbled upon this with GRDB.swift -- same error, also 0.24.0. Pods directory was excluded in .swiftlint.yml.

Minimal test would be:

  • Create a new iOS project
  • Do pod init
  • Add pod 'GRDB.swift' and pod 'SwiftLint' to Podfile
  • Do pod install
  • Add exclude: - Pods to .swiftlint.yml
  • Open workspace
  • Add Run Build Script phase for swiftlint
  • Build project

@123kyky
Copy link
Author

123kyky commented Dec 1, 2017

Here is a very simple recreation. Just two swift files, a swiftlint config, and a folder with ".swift" in the name. Uncompress and run "swiftlint" in terminal within the new folder.
SwiftLintFolderNamesTest.zip

@marcelofabri
Copy link
Collaborator

Fixed in #2047.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

No branches or pull requests

3 participants