SwiftLint: Problem when SwiftLint loads ".swiftlint.yml"
Hello every one!
I am having problem with SwiftLint at version 0.7.2 and I can’t build my project on Xcode 7.2, when I include the “.swiftlint.yml” file at the root of project, the follow message appears
Loading configuration from '.swiftlint.yml'
No lintable files found at path ''
Command /bin/sh failed with exit code 1
But build the project without the file “.swiftlint.yml” run right, but I need specify some rules.
Any clues on what this issue might be?
Thanks for all!!!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 22
- Comments: 18
I just updated to xcode 10.2 and surprisingly ran into this problem, even with the default config file.
What helped for me was to comment out the Sources directory in the config file, like so:
Commenting
- Sourcesolve this issue here.What’s the contents of your
Sourcedirectory? Are there Swift files inSourceother than inExcludedFolderorExcludedFile.swift?Reproduced this problem when a project has spaces in the name/path. If the spaces are removed, it works fine.
I just uninstalled and reinstalled it via brew (with still the same .swiftlint.yml file in place) and now it works.
@jpsim Sure. Create a new project, name it something like “Test Project”. In the .swiftlint.yml, add/replace these lines (or something similar referencing the path with spaces):
SwiftLint will give you the error referenced above now. It will run if the spaces are removed in the project path/folders, or if you remove the included/excluded configuration.