-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Hi @garriguv, I encountered a runtime error like the following when attempting to integrate danger-swiftformat on GitLab.
Error
bundler: failed to load command: danger (/builds/technology/ios/project/.bundle/ruby/2.7.0/bin/danger)
/builds/technology/ios/project/.bundle/ruby/2.7.0/gems/danger-swiftformat-0.9.0/lib/swiftformat/swiftformat.rb:31:in `check_format': \e[31m (Danger::DSLError)
[!] Invalid `Dangerfile` file: Error running SwiftFormat:
Error: \e[0m./swiftformat: line 1: syntax error: unexpected word (expecting ")")\e[0m
# from Dangerfile:6
# -------------------------------------------
# swiftformat.binary_path = "./swiftformat"
> swiftformat.check_format
# -------------------------------------------
from /builds/technology/ios/project/.bundle/ruby/2.7.0/gems/danger-swiftformat-0.9.0/lib/swiftformat/plugin.rb:59:in `check_format'
from Dangerfile:6:in `eval_file'
Dangerfile
require "gitlab-dangerfiles"
Gitlab::Dangerfiles.for_project(self, &:import_defaults)
swiftformat.binary_path = "./swiftformat"
swiftformat.check_format
.swiftformat
# file options
--exclude Tests/XCTestManifests.swift,Tests/BadConfig,Snapshots,Build,PluginTests,Pods
# format options
--guardelse same-line
--lineaftermarks false
--emptybraces spaced
--patternlet inline
--marktypes never
--markextensions never
--redundanttype inferred
--trailingclosures filter,map,compactMap
--commas inline
--stripunusedargs closure-only
--wraparguments before-first
--wrapparameters before-first
--wrapreturntype if-multiline
--wrapconditions after-first
--trimwhitespace nonblank-lines
# rules
--enable spaceAroundBraces
--enable wrapConditionalBodies
--enable redundantOptionalBinding
--disable initCoderUnavailable
What can I do to fix this issue? Is there anything that I missed?
carlos-santos-anchor
Metadata
Metadata
Assignees
Labels
No labels