contentful / contentful.swift

A delightful Swift interface to Contentful's content delivery API.
MIT License
203 stars 83 forks source link

SwiftLint warnings #104

Closed brentleyjones closed 7 years ago

brentleyjones commented 7 years ago
  • contentful.swift version number: 0.8.0
  • Xcode version number: 8.3.3
  • Target operating system(s) and version number(s)
  • [x] iOS:
  • [ ] tvOS:
  • [ ] watchOS:
  • [ ] macOS:
  • Package manager:
  • [x] Carthage
  • [ ] Cocoapods

Currently there are 95 SwiftLint warnings when building the project:

Loading configuration from '.swiftlint.yml'
Invalid configuration for 'line_length'. Falling back to default.
configuration error: 'identifier_name' is not a valid rule identifier
Valid rule identifiers:
empty_count
redundant_optional_initialization
trailing_semicolon
statement_position
type_name
unused_enumerated
todo
legacy_constant
force_cast
nimble_operator
unused_closure_parameter
number_separator
comma
sorted_imports
implicit_getter
legacy_cggeometry_functions
force_unwrapping
leading_whitespace
cyclomatic_complexity
function_body_length
control_statement
empty_parentheses_with_trailing_closure
dynamic_inline
type_body_length
unused_optional_binding
operator_whitespace
closure_spacing
prohibited_super_call
vertical_whitespace
object_literal
valid_docs
redundant_void_return
large_tuple
trailing_whitespace
mark
empty_parameters
legacy_nsgeometry_functions
shorthand_operator
closing_brace
class_delegate_protocol
colon
closure_parameter_position
nesting
switch_case_on_newline
file_header
conditional_returns_on_newline
trailing_newline
missing_docs
variable_name
redundant_nil_coalescing
private_unit_test
compiler_protocol_init
return_arrow_whitespace
operator_usage_whitespace
attributes
overridden_super_call
vertical_parameter_alignment
first_where
private_outlet
generic_type_name
explicit_init
legacy_constructor
closure_end_indentation
custom_rules
function_parameter_count
syntactic_sugar
trailing_comma
void_return
valid_ibinspectable
opening_brace
line_length
weak_delegate
force_try
redundant_string_enum_value
file_length
Linting Swift files in current working directory
Linting 'Package.swift' (1/23)
Linting 'Client+AppKit.swift' (2/23)
Linting 'ArrayResponse.swift' (3/23)
Linting 'Asset.swift' (4/23)
Linting 'Client.swift' (5/23)
Linting 'ClientConfiguration.swift' (6/23)
Linting 'ContentModellable.swift' (7/23)
Linting 'ContentType.swift' (8/23)
Linting 'Date.swift' (9/23)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/ArrayResponse.swift:29: warning: Line Length Violation: Line should be 120 characters or less: currently 133 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/ArrayResponse.swift:75: warning: Line Length Violation: Line should be 120 characters or less: currently 133 characters (line_length)
Linting 'Entry.swift' (10/23)
Linting 'Error.swift' (11/23)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Asset.swift:29: warning: Line Length Violation: Line should be 120 characters or less: currently 131 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Asset.swift:46: warning: Line Length Violation: Line should be 120 characters or less: currently 122 characters (line_length)
Linting 'Field.swift' (12/23)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/ClientConfiguration.swift:46: warning: Line Length Violation: Line should be 120 characters or less: currently 145 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/ClientConfiguration.swift:106: warning: Line Length Violation: Line should be 120 characters or less: currently 138 characters (line_length)
Linting 'ImageOptions.swift' (13/23)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:459:47: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:470:47: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:528:53: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:540:53: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:605:47: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:628:47: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:72: warning: Line Length Violation: Line should be 120 characters or less: currently 131 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:204: warning: Line Length Violation: Line should be 120 characters or less: currently 124 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:206: warning: Line Length Violation: Line should be 120 characters or less: currently 127 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:208: warning: Line Length Violation: Line should be 120 characters or less: currently 124 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:213: warning: Line Length Violation: Line should be 120 characters or less: currently 132 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:223: warning: Line Length Violation: Line should be 120 characters or less: currently 128 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:226: warning: Line Length Violation: Line should be 120 characters or less: currently 124 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:233: warning: Line Length Violation: Line should be 120 characters or less: currently 132 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:241: warning: Line Length Violation: Line should be 120 characters or less: currently 128 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:245: warning: Line Length Violation: Line should be 120 characters or less: currently 124 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:257: warning: Line Length Violation: Line should be 120 characters or less: currently 126 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:328: warning: Line Length Violation: Line should be 120 characters or less: currently 137 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:356: warning: Line Length Violation: Line should be 120 characters or less: currently 136 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:390: warning: Line Length Violation: Line should be 120 characters or less: currently 144 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:391: warning: Line Length Violation: Line should be 120 characters or less: currently 129 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:399: warning: Line Length Violation: Line should be 120 characters or less: currently 136 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:422: warning: Line Length Violation: Line should be 120 characters or less: currently 147 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:428: warning: Line Length Violation: Line should be 120 characters or less: currently 144 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:444: warning: Line Length Violation: Line should be 120 characters or less: currently 125 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:459: warning: Line Length Violation: Line should be 120 characters or less: currently 127 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:484: warning: Line Length Violation: Line should be 120 characters or less: currently 131 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:495: warning: Line Length Violation: Line should be 120 characters or less: currently 123 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:529: warning: Line Length Violation: Line should be 120 characters or less: currently 127 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:554: warning: Line Length Violation: Line should be 120 characters or less: currently 143 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:565: warning: Line Length Violation: Line should be 120 characters or less: currently 135 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:566: warning: Line Length Violation: Line should be 120 characters or less: currently 125 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:581: warning: Line Length Violation: Line should be 120 characters or less: currently 132 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Client.swift:592: warning: Line Length Violation: Line should be 120 characters or less: currently 125 characters (line_length)
Linting 'Link.swift' (14/23)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/ContentModellable.swift:14:5: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/ContentModellable.swift:61: warning: Line Length Violation: Line should be 120 characters or less: currently 139 characters (line_length)
Linting 'Locale.swift' (15/23)
Linting 'Persistence.swift' (16/23)
Linting 'Query.swift' (17/23)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Entry.swift:54: warning: Line Length Violation: Line should be 120 characters or less: currently 126 characters (line_length)
Linting 'Resource.swift' (18/23)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Error.swift:110:25: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Error.swift:65: warning: Line Length Violation: Line should be 120 characters or less: currently 121 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Error.swift:70: warning: Line Length Violation: Line should be 120 characters or less: currently 126 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Error.swift:146: warning: Line Length Violation: Line should be 120 characters or less: currently 142 characters (line_length)
Linting 'SignalUtils.swift' (19/23)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Field.swift:48:12: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
Linting 'Space.swift' (20/23)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/ImageOptions.swift:80: warning: Line Length Violation: Line should be 120 characters or less: currently 126 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/ImageOptions.swift:83: warning: Line Length Violation: Line should be 120 characters or less: currently 124 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/ImageOptions.swift:104: warning: Line Length Violation: Line should be 120 characters or less: currently 129 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/ImageOptions.swift:229: warning: Line Length Violation: Line should be 120 characters or less: currently 175 characters (line_length)
Linting 'SyncSpace.swift' (21/23)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Link.swift:15:12: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Link.swift:40:12: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Link.swift:25: warning: Line Length Violation: Line should be 120 characters or less: currently 123 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Link.swift:71: warning: Line Length Violation: Line should be 120 characters or less: currently 132 characters (line_length)
Linting 'Sys.swift' (22/23)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Locale.swift:114: warning: Line Length Violation: Line should be 120 characters or less: currently 160 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Locale.swift:117: warning: Line Length Violation: Line should be 120 characters or less: currently 137 characters (line_length)
Linting 'Client+UIKit.swift' (23/23)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Resource.swift:20:12: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Resource.swift:57: warning: Line Length Violation: Line should be 120 characters or less: currently 150 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Resource.swift:102: warning: Line Length Violation: Line should be 120 characters or less: currently 127 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:15: warning: Line Length Violation: Line should be 120 characters or less: currently 121 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:51: warning: Line Length Violation: Line should be 120 characters or less: currently 122 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:78: warning: Line Length Violation: Line should be 120 characters or less: currently 146 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:103: warning: Line Length Violation: Line should be 120 characters or less: currently 124 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:206: warning: Line Length Violation: Line should be 120 characters or less: currently 134 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:248: warning: Line Length Violation: Line should be 120 characters or less: currently 128 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:257: warning: Line Length Violation: Line should be 120 characters or less: currently 143 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:268: warning: Line Length Violation: Line should be 120 characters or less: currently 132 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:272: warning: Line Length Violation: Line should be 120 characters or less: currently 128 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:295: warning: Line Length Violation: Line should be 120 characters or less: currently 122 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:296: warning: Line Length Violation: Line should be 120 characters or less: currently 147 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:307: warning: Line Length Violation: Line should be 120 characters or less: currently 126 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:353: warning: Line Length Violation: Line should be 120 characters or less: currently 142 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:356: warning: Line Length Violation: Line should be 120 characters or less: currently 143 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:368: warning: Line Length Violation: Line should be 120 characters or less: currently 132 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:372: warning: Line Length Violation: Line should be 120 characters or less: currently 128 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:377: warning: Line Length Violation: Line should be 120 characters or less: currently 127 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:402: warning: Line Length Violation: Line should be 120 characters or less: currently 122 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:403: warning: Line Length Violation: Line should be 120 characters or less: currently 147 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:413: warning: Line Length Violation: Line should be 120 characters or less: currently 141 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:463: warning: Line Length Violation: Line should be 120 characters or less: currently 133 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:476: warning: Line Length Violation: Line should be 120 characters or less: currently 121 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:478: warning: Line Length Violation: Line should be 120 characters or less: currently 133 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:514: warning: Line Length Violation: Line should be 120 characters or less: currently 138 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:581: warning: Line Length Violation: Line should be 120 characters or less: currently 133 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:582: warning: Line Length Violation: Line should be 120 characters or less: currently 141 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:587: warning: Line Length Violation: Line should be 120 characters or less: currently 138 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:634: warning: Line Length Violation: Line should be 120 characters or less: currently 138 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:685: warning: Line Length Violation: Line should be 120 characters or less: currently 131 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:686: warning: Line Length Violation: Line should be 120 characters or less: currently 145 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:698: warning: Line Length Violation: Line should be 120 characters or less: currently 137 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Query.swift:704: warning: Line Length Violation: Line should be 120 characters or less: currently 126 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/SignalUtils.swift:19: warning: Line Length Violation: Line should be 120 characters or less: currently 147 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/SignalUtils.swift:30: warning: Line Length Violation: Line should be 120 characters or less: currently 139 characters (line_length)
/Users/bejones/Development/project/Carthage/Checkouts/contentful.swift/Sources/Sys.swift:15:12: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: 'id' (variable_name)
Done linting! Found 96 violations, 0 serious in 23 files.
brentleyjones commented 7 years ago

I think the issue is with:

Invalid configuration for 'line_length'. Falling back to default.
configuration error: 'identifier_name' is not a valid rule identifier
loudmouth commented 7 years ago

I'm a bit surprised as I have no warnings at all on my machine when running swiftlint.

Which version of swiftlint are you running? I'm updated at 0.20.1

loudmouth commented 7 years ago

Hey @brentleyjones , just wanted to double check which version of SwiftLint you may be using.

brentleyjones commented 7 years ago

0.16.1, so probably the issue. Upgraded.