SwiftLint suddenly stopped ignoring my Pods folder and it's giving errors

1.2k views Asked by At

I'm working in a huge swift project. I'm testing DeviceKit pod from cocoapods, and worked perfectly until today. Even yesterday worked perfectly.

Now, suddenly I can't compile because that class is giving me these kind of errors:

Device.generated.swift:49:8: Type Body Length Violation: Type body should span 300 lines or less excluding comments and whitespace: currently spans 447 lines (type_body_length)

Device.generated.swift:220:10: Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'appleWatchSeries0_42mm' (identifier_name)

Device.generated.swift:1150:1: File Line Length Violation: File should contain 400 lines or less: currently contains 1150 (file_length)

It's this class from this project: https://github.com/devicekit/DeviceKit/blob/master/Source/Device.generated.swift

I didn't touch the class, It's a class inside a pod, so I can't understand why yesterday it was compiling perfectly and now it doesn't compile. How is that possible?

I have this version of SwiftLint in my cocoapods pod file:

pod 'SwiftLint', '<= 0.20.1' # SwiftLint, para limpieza de código

I tried updating it to last version, but the problem persists.

This is my .SwiftLint.yml file, as you can see is ignoring pods:

disabled_rules: # rule identifiers to exclude from running
#  - colon
#  - comma
  - control_statement
  - vertical_whitespace
  - trailing_whitespace
  - discarded_notification_center_observer
opt_in_rules: # some rules are only opt-in
  - explicit_init
  - fatal_error_message
  - first_where
  - multiline_parameters
  - operator_usage_whitespace
  - private_outlet
  - cyclomatic_complexity
included: # paths to include during linting. `--path` is ignored if present.
excluded: # paths to ignore during linting. Takes precedence over `included`.
  - Pods

# configurable rules can be customized from this configuration file
# binary rules can set their severity level
force_cast: warning # implicitly
force_try:
  severity: warning # explicitly
# rules that have both warning and error levels, can set just the warning level
# implicitly
function_body_length:
  warning: 50
  error: 200
line_length: 
  warning: 200
  error: 300
  ignores_function_declarations: true
  ignores_comments: true
identifier_name:
  min_length:
    warning: 3
  excluded:
    - id
    - to
    - db
    - ad
# they can set both implicitly with an array
type_body_length:
  - 300 # warning
  - 400 # error
# or they can set both explicitly
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji)
0

There are 0 answers