Closed ghost closed 2 years ago
It seems that the issue is from Swiftlint's JSON, which is empty, can I see your Swiftlint config please?
My .swiftlint.yml (worked fine before the update):
excluded:
- Pods
- Package.swift
- .build
disabled_rules:
- comment_spacing
- file_length
- function_body_length
- function_parameter_count
- identifier_name
- large_tuple
- line_length
- multiple_closures_with_trailing_closure
- nesting
- statement_position
- todo
- trailing_comma
- trailing_newline
- type_body_length
- type_name
- unused_closure_parameter
- unused_optional_binding
- xctfail_message
opt_in_rules:
- array_init
- closure_end_indentation
- closure_spacing
- collection_alignment
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- convenience_type
- empty_collection_literal
- empty_count
- empty_string
- first_where
- identical_operands
- last_where
- legacy_random
- literal_expression_end_indentation
- operator_usage_whitespace
- overridden_super_call
- prefer_self_type_over_type_of_self
- prefer_zero_over_explicit_init
- prohibited_super_call
- redundant_nil_coalescing
- redundant_type_annotation
- sorted_first_last
- toggle_bool
- unowned_variable_capture
- untyped_error_in_catch
- unused_declaration
- unused_import
empty_count:
severity: warning
force_cast: warning
force_try: warning
shorthand_operator: warning
cyclomatic_complexity: 50
trailing_whitespace:
ignores_empty_lines: true
custom_rules:
non_localized_string:
regex: '(?<!NSLocalizedString\(|fatalError\(|assertionFailure\(|preconditionFailure\(|assert\(false, |format: |separator: |deprecated, message: |level: \.debug, |level: \.info, |level: \.warning, |level: \.error, |\.debug\(|\.info\(|\.warn\(|\.error\(|logError\(|\(category: |\w|\")(?:"[^" \n]+ [^"\n]*"|"[[:upper:]][[:lower:]]+"|""".*?""")'
message: "Use LocalizedStrings or add `// TODO: Localize` above"
match_kinds: string
excluded: '.*Tests/|.*/Resources/|.*/Scripts/|LocalizedStrings.swift'
localization_mark:
regex: '(?:MARK|TODO): *-? *(?:Needs?[- ])?(?:Translate|Translation|Locali[sz]e|Locali[sz]ation)(?:[- ]Needed)?'
message: 'Missing localized string. Build locally to add it.'
match_kinds: comment
excluded: '.*Tests/|.*/Resources/|.*/Scripts/'
severity: error
missing_doc_comment:
regex: '^([^\n]{0,5}|([^\/\n]|[^\n]{1,2}[^\/])[^\n]*)\n[^\n]*class\s+\w+FlowCoordinator'
message: "Explain what the coordinator below does using a doc comment `/// Description`"
excluded: '.*Tests/|.*/Resources/|.*/Scripts/'
Don't you have any updates other than Package.swift the PR?
Adding allow_zero_lintable_files: true
to .swiftlint.yml may help you.
Perfect, thanks!
I have updated my swift package to
swift-tools-version:5.6
, and my GA workflow to use Xcode 13.4:Now I get this error from Danger:
My Dangerfile.swift is simple:
Any ideas how to fix?