Closed Vadimkomis closed 6 years ago
Did you add a script to run SwiftLint in your build phases? How's that script?
@marcelofabri I did add that. Here's the script that I added: "${PODS_ROOT}/SwiftLint/swiftlint"
@marcelofabri are you sure that it's not a bug ?
This looks like a configuration issue. I suggest you to add the full log from Circle CI so we can understand what's happening.
I also would try to run exactly what Circle runs but locally.
@marcelofabri Running the script that Circle locally, works just fine. Here's the log that I keep (running with cache and without cache) getting:
▸ Compiling ChooseMeals.storyboard ▸ Compiling Main.storyboard ▸ Compiling Web.storyboard ▸ Compiling CalendarModule.storyboard ▸ Compiling Upcoming.storyboard ▸ Compiling MealPlanner.storyboard ▸ Compiling AppStatus.storyboard ▸ Compiling Forms.storyboard ▸ Processing Freshly Dev-Info.plist ▸ Generating 'Freshly\ Dev.app.dSYM' ▸ Running script 'Run Script' ▸ Running script '[CP] Embed Pods Frameworks' ▸ Running script '[CP] Copy Pods Resources' ▸ Running script 'Run Script' ▸ Running script 'Run Script'
⚠️ /Users/distiller/freshly_ios/Freshly/Controllers/choose-meals/ChooseMealsConfigCell.swift:41:13: Statement Position Violation: Else and catch should be on the same line, one space after the previous declaration. (statement_position)
Linting 'HomeController.swift' (12/264) ^
BUILD FAILED
The following build commands failed: PhaseScriptExecution Run\ Script /Users/distiller/Library/Developer/Xcode/DerivedData/Freshly-aqfftomwdlyzfadmktypldmeqhgq/Build/Intermediates.noindex/Freshly.build/Debug-iphonesimulator/Freshly\ Dev.build/Script-DD8F23DD204E04A700609DF3.sh (1 failure) 2018-03-20 06:36:01.810 xcodebuild[1153:7411] [MT] IDETestOperationsObserverDebug: (C7475127-42C8-4321-AB5C-12500CAA18BF) Beginning test session FreshlyUITests-C7475127-42C8-4321-AB5C-12500CAA18BF at 2018-03-20 06:36:01.810 with Xcode 9C40b on target <DVTiPhoneSimulator: 0x7fca8ecc19e0> { SimDevice: iPhone 6s (D2CE8B34-2AE7-45E4-8BCF-54F4D60212D6, iOS 10.3, Booted) } (10.3.1 (14E8301)) 2018-03-20 06:36:01.817 xcodebuild[1153:7411] [MT] IDETestOperationsObserverDebug: (612A415F-458E-4ADB-9394-0C584ED3F6F4) Beginning test session FreshlyTests-612A415F-458E-4ADB-9394-0C584ED3F6F4 at 2018-03-20 06:36:01.817 with Xcode 9C40b on target <DVTiPhoneSimulator: 0x7fca8ecc19e0> { SimDevice: iPhone 6s (D2CE8B34-2AE7-45E4-8BCF-54F4D60212D6, iOS 10.3, Booted)
Yes. It was a Circle issue. As soon as I updated to Circle 2.0 it resolved this issue.
I started having the same problem, it happened on Circle 2.0 and 2.1.
How I solved it was by explicitly adding included
the list of folders I want to scan.
In my project they are only 2 (main app and tests) so no big deal, but still I think this is a bug.
If need any more info feel free to ask :)
We're also still experiencing this issue on 2.0, fixed by explicitly adding included
as mentioned above.
I started having the same problem, it happened on Circle 2.0 and 2.1. How I solved it was by explicitly adding
included
the list of folders I want to scan.In my project they are only 2 (main app and tests) so no big deal, but still I think this is a bug.
If need any more info feel free to ask :)
Thanks !
Had the same issue with GitHub Actions.
Fixed by using included
field.
New Issue Checklist
Bug Report
When I enable force casting as a rule in my linter it makes my build to fail on circleci. I installed the swiftlinter via cocoa pods. It keeps complaining about force casting as you can see below. I think it has something to do with the run script that for swxftlint.
Complete output when running SwiftLint, including the stack trace and command used
Environment
swiftlint version
to be sure)?excluded: # paths to ignore during linting. Takes precedence over
included
.opt_in_rules: # some rules are only opt-in
disabled_rules: # rule identifiers to exclude from running
line_length: 270
type_name: min_length: 2