Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run Swiftlint due to missing Swiftlint.yml #69

Open
RStanbouly opened this issue Jul 19, 2022 · 8 comments
Open

Unable to run Swiftlint due to missing Swiftlint.yml #69

RStanbouly opened this issue Jul 19, 2022 · 8 comments
Labels

Comments

@RStanbouly
Copy link

RStanbouly commented Jul 19, 2022

Been running into this issue with the Swiftlint plugin for a bit. Currently running a project using a PBXProj using this file structure

/AppFolder
     .swiftlint.yml
     /project_gen
           .swiftlint.yml
           .pbxproj
     /Modules
          ___ALL MY CODE___
          .swiftlint.yml

Despite this, Swiftlint still does not trigger for my project. I know that I have properly configured the plugin/settings as when I disable disable when no .swiftlint.yml present, I immediately receive swiftlint warnings/errors.

@bealex
Copy link
Owner

bealex commented Jul 19, 2022

Hi, thanks for the report. Is it possible to show all the .swiftlint.yml files?

@bealex bealex added the bug label Jul 19, 2022
@RStanbouly
Copy link
Author

Apologies, I'm unsure as to what you're referring to? Like, where they're located in the project folder structure?

@bealex
Copy link
Owner

bealex commented Jul 21, 2022

No, contents of the .swiftlint.yml files themselves. I see three of them, and would like to reproduce the situation.

@RStanbouly
Copy link
Author

Ahh


# rule identifiers to exclude from running
# list of rules here: https://realm.github.io/SwiftLint/rule-directory.html
disabled_rules:
  - cyclomatic_complexity
  - comment_spacing
  - weak_delegate
  - todo
  - notification_center_detachment
  - file_length
  - function_body_length
  - identifier_name
  - inclusive_language
  - force_cast
  - force_try
  - line_length
  - nesting
  - type_body_length
  - class_delegate_protocol
  - trailing_comma
  - trailing_whitespace
  - multiple_closures_with_trailing_closure
  - reduce_boolean
  - nsobject_prefer_isequal
  - unused_setter_value
  - legacy_hashing
  - generic_type_name
  - for_where

# some rules are only opt-in
opt_in_rules:
  - unused_import
  - unused_declaration
  - modifier_order
  - sorted_imports

  # Find all the available rules by running:
  # swiftlint rules

# paths to exclude during linting
excluded: # paths to ignore during linting. Takes precedence over `included`.
  - .git
  - carthage
  - EmbeddedFrameworks/SlackInstrumentation/Generated
  - Modules/Data/ClogSchema/Implementation/Generated
  - Modules/Data/ClogSchema/Implementation/Thrift Support
  - Modules/Telemetry/TelemetryService/Implementation/Generated
  - Modules/Telemetry/TraceService/Implementation/Generated
  - Modules/Services/Telephony/Implementation/Chime/Generated
  - Modules/Features/EnterpriseUI
  - Modules/Features/Settings/Implementation/LegacyEditProfile
  - xcode_templates
  - tooling
  - project_gen

# If the only files that changed are excluded, then treat as success
allow_zero_lintable_files: true

# customized rules -
# Enabled rules by default
# Set all warnings as error
closing_brace:
  severity: error
comma:
  severity: error
empty_parameters:
  severity: error
empty_parentheses_with_trailing_closure:
  severity: error
leading_whitespace:
  severity: error
legacy_cggeometry_functions:
  severity: error
legacy_constant:
  severity: error
legacy_nsgeometry_functions:
  severity: error
opening_brace:
  severity: error
protocol_property_accessors_order:
  severity: error
redundant_discardable_let:
  severity: error
redundant_optional_initialization:
  severity: error
redundant_void_return:
  severity: error
statement_position:
  severity: error
trailing_newline:
  severity: error
trailing_semicolon:
  severity: error
unused_closure_parameter:
  severity: error
unused_optional_binding:
  severity: error
vertical_whitespace:
  severity: error
void_return:
  severity: error
closure_parameter_position:
  severity: error
compiler_protocol_init:
  severity: error
control_statement:
  severity: error
dynamic_inline:
  severity: error
private_unit_test:
  severity: error
vertical_parameter_alignment:
 severity: error
empty_enum_arguments:
 severity: error
valid_ibinspectable:
 severity: error
unused_enumerated:
 severity: error
syntactic_sugar:
 severity: error
mark:
 severity: error
operator_whitespace:
 severity: error
shorthand_operator:
 severity: error
return_arrow_whitespace:
 severity: error
redundant_string_enum_value:
 severity: error
type_name:
 severity: error
private_over_fileprivate:
 severity: error
function_parameter_count:
 severity: error
legacy_constructor:
 severity: error
implicit_getter:
 severity: error
switch_case_alignment:
 severity: error
modifier_order:
  severity: error
sorted_imports:
  severity: error

function_parameter_count:
  warning: 20
  error: 20

modifier_order:
  preferred_modifier_order:
    - acl
    - override

type_name:
    min_length: 1
    max_length: 55

swiftlint_version: 0.47.1

@bealex
Copy link
Owner

bealex commented Aug 6, 2022

@RStanbouly Sorry for long wait. I see you are specifying swiftlint_version there. Is is same as the CLI utility version?

@RStanbouly
Copy link
Author

Correct @bealex

@bealex
Copy link
Owner

bealex commented Aug 8, 2022

Ok, thanks. Still trying to reproduce.

@RStanbouly
Copy link
Author

Is there a way for me to debug this @bealex ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants