Open Dmitry-Pliushchai opened 2 years ago
@ashfurrow Facing the same issue on ubuntu. It works fine when the system being used is macos. But somehow fails for ubuntu-latest (20.04)
Logs are not much helpful either:
Run bash ./Scripts/danger_lint.sh
Config file was not specified.
Swiftlint will be run from /home/runner/work/SpotlightDemo/SpotlightDemo
Swiftlint will exclude the following paths: []
Swiftlint includes the following paths: []
linting with options: {:config=>nil, :reporter=>"json", :quiet=>true, :***"/home/runner/work/SpotlightDemo/SpotlightDemo", :force_exclude=>true}
Swiftlint will lint the following files: /home/runner/work/SpotlightDemo/SpotlightDemo/Dangerfile.swift
/var/lib/gems/2.[7](https://github.com/aakarsh-sasi/SpotlightDemo/runs/5216630942?check_suite_focus=true#step:5:7).0/gems/danger-swiftlint-0.2[9](https://github.com/aakarsh-sasi/SpotlightDemo/runs/5216630942?check_suite_focus=true#step:5:9).4/ext/swiftlint/bin/swiftlint: 1: ����@����@������: not found
/var/lib/gems/2.7.0/gems/danger-swiftlint-0.29.4/ext/swiftlint/bin/swiftlint: 2: Syntax error: "(" unexpected
Received from Swiftlint: {}
All green. Jolly good show.
Looks like the SwiftLint binary might be corrupted after the download: https://github.com/ashfurrow/danger-ruby-swiftlint/blob/a955921c8322d777ed7a4d679d1b062528274fc3/ext/swiftlint/downloadSwiftlint.sh#L39-L48
I can take a look at downloadSwiftLint.sh
this weekend and see if we have any compatibility issues with Ubuntu.
Thank you @dirtyhabits97 – let us know what you learn 👍
The downloadSwift.sh
command seems to be working as intended.
Perhaps we should download swiftlint_linux.zip
here:
https://github.com/ashfurrow/danger-ruby-swiftlint/blob/a955921c8322d777ed7a4d679d1b062528274fc3/ext/swiftlint/Rakefile#L12
Instead of portable_swiftlint.zip
.
I don't think portable_swiftlint.zip
will help either. Here is what I tried.
I downloaded the portable version of swiftlint using Curl using the command:
curl -s -L https://github.com/realm/SwiftLint/releases/download/0.47.0/portable_swiftlint.zip -o "portable_swiftlint.zip"
unzip -o -q portable_swiftlint.zip -d ../swiftlintportable/bin
Executed Danger by defining the custom Swiftlint path in Dangerfile using: swiftlint.binary_path
.
However, I still get a very similar error during execution:
/home/runner/work/repo/swiftlintportable/bin/swiftlint: 1: Syntax error: "(" unexpected
[46](https://github.com/org/repo/runs/6145317925?check_suite_focus=true#step:5:46)
I also tried installing Swiftlint via Mint. No success. But get a slightly different error:
SourceKittenFramework/library_wrapper.swift:31: Fatal error: Loading libsourcekitdInProc.so failed
Getting this exact problem on a runner with Ubuntu 20.04.5 LTS.
Hi there, is there a fix for this error or is it still giving errors? Thanks in advance!
I use github action to run danger. It works fine on macOS but doesn't work on ubuntu.
GitHub action .yml: