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

123kyky opened this Issue Nov 15, 2017 · 4 comments


None yet
3 participants

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/, line 181
Illegal instruction: 4



Pulled from config

  - 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:

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?


This comment has been minimized.


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 label Nov 28, 2017


This comment has been minimized.

jerekapyaho commented Nov 30, 2017

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

This comment has been minimized.

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.


This comment has been minimized.


marcelofabri commented Feb 12, 2018

Fixed in #2047.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment