You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two directories next to each other. The first directory contains a Xcode project on which swiftlint is supposed to be called on from the command line. In the other directory which has the same name as the first directory, just with a small addition to the name, has other Swift files which are also supposed to be linted. Due to the overlapping name the the second directory doesn't get scanned for files to be linted. When changing the name of the second directory to something that doesn't overlap with the first name running the same command the files from the second directory get detected.
Swiftlint is supposed to be called within the 'samename' directory and the 'samenamexxx' directory also should be linted according to the .swiftlint.yml. Only when I change 'samenamexxx' to (for example) 'anotherdir' and also enter this in the config file then it get's scanned for swift files and those are linted.
Background is we have a real-world project at my company where we modularize our application via cocoapods and have the umbrella-app repository named 'ios-my-company-name' and all the other pod repos which are supposed to be linted we have named 'ios-my-company-name-core' or more generally 'ios-my-company-name-'. The reside next to each other in a directory and are included so we can import them as development pods via cocoapods. The linked repo above is just the minimal reproducable example I could find.
Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint
Linting Swift files in current working directory
Linting 'ViewController.swift' (1/2)
Linting 'AppDelegate.swift' (2/2)
/Users/yborgfeld/Desktop/Test/samename/LintingProject/ViewController.swift:26:1: warning: Trailing Newline Violation: Files should have a single trailing newline. (trailing_newline)
/Users/yborgfeld/Desktop/Test/samename/LintingProject/ViewController.swift:24:1: warning: Vertical Whitespace Violation: Limit vertical whitespace to a single empty line. Currently 2. (vertical_whitespace)
/Users/yborgfeld/Desktop/Test/samename/LintingProject/AppDelegate.swift:26:1: warning: Trailing Newline Violation: Files should have a single trailing newline. (trailing_newline)
/Users/yborgfeld/Desktop/Test/samename/LintingProject/AppDelegate.swift:13:1: warning: Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
/Users/yborgfeld/Desktop/Test/samename/LintingProject/AppDelegate.swift:15:1: warning: Vertical Whitespace Violation: Limit vertical whitespace to a single empty line. Currently 4. (vertical_whitespace)
/Users/yborgfeld/Desktop/Test/samename/LintingProject/AppDelegate.swift:24:1: warning: Vertical Whitespace Violation: Limit vertical whitespace to a single empty line. Currently 2. (vertical_whitespace)
Done linting! Found 6 violations, 0 serious in 2 files.
Environment
SwiftLint version: 0.43.1
Installation method: Homebrew or CocoaPods (doesn't matter)
Paste your configuration file:
included:
- ../samename
- ../samenamexxx
Xcode Version: 12.5.1
Edit: This bug also occurs when only the second directory is in the included paths.
We found a workaround by passing the included directories via the command line and remove the 'included' section from the .swiftlint.yml file. Seems like this is only a bug with the yaml file.
The text was updated successfully, but these errors were encountered:
New Issue Checklist
Describe the bug
I have two directories next to each other. The first directory contains a Xcode project on which swiftlint is supposed to be called on from the command line. In the other directory which has the same name as the first directory, just with a small addition to the name, has other Swift files which are also supposed to be linted. Due to the overlapping name the the second directory doesn't get scanned for files to be linted. When changing the name of the second directory to something that doesn't overlap with the first name running the same command the files from the second directory get detected.
An example of this can be found here: https://github.com/Cronay/swiftlint_name_collision
Swiftlint is supposed to be called within the 'samename' directory and the 'samenamexxx' directory also should be linted according to the .swiftlint.yml. Only when I change 'samenamexxx' to (for example) 'anotherdir' and also enter this in the config file then it get's scanned for swift files and those are linted.
Background is we have a real-world project at my company where we modularize our application via cocoapods and have the umbrella-app repository named 'ios-my-company-name' and all the other pod repos which are supposed to be linted we have named 'ios-my-company-name-core' or more generally 'ios-my-company-name-'. The reside next to each other in a directory and are included so we can import them as development pods via cocoapods. The linked repo above is just the minimal reproducable example I could find.
Complete output when running SwiftLint, including the stack trace and command used
Environment
Xcode Version: 12.5.1
Edit: This bug also occurs when only the second directory is in the included paths.
We found a workaround by passing the included directories via the command line and remove the 'included' section from the
.swiftlint.yml
file. Seems like this is only a bug with the yaml file.The text was updated successfully, but these errors were encountered: