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

Rule configuration discoverability #2808

Closed
2 tasks done
idrougge opened this issue Jul 10, 2019 · 3 comments
Closed
2 tasks done

Rule configuration discoverability #2808

idrougge opened this issue Jul 10, 2019 · 3 comments

Comments

@idrougge
Copy link

New Issue Checklist

Describe the bug

The README.md file specifies that rules may have custom configurability, but those options aren't listed in Rules.md, neither are they when executing swiftlint rules rule_name, rendering only the same contents as in Rules.md. Running swiftlint rules spits out a list of all rules, with a configuration column that hints at configurability but is truncated so that even the names of the config options cannot be read, let alone what parameters they expect.

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint rules type_name

Type Name (type_name): Type name should only contain alphanumeric characters, start with an uppercase character and span between 3 and 40 characters in length.

Triggering Examples (violation is marked with ''):

Example #1

    class ↓myType {}

Example #2

    class ↓_MyType {}

Example #3

    private class ↓MyType_ {}

Example #4

    class ↓My {}

Example #5

    class ↓AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA {}

Example #6

    struct ↓myType {}

Example #7

    struct ↓_MyType {}

Example #8

    private struct ↓MyType_ {}

Example #9

    struct ↓My {}

Example #10

    struct ↓AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA {}

Example #11

    enum ↓myType {}

Example #12

    enum ↓_MyType {}

Example #13

    private enum ↓MyType_ {}

Example #14

    enum ↓My {}

Example #15

    enum ↓AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA {}

Example #16

    typealias ↓X = Void

Example #17

    private typealias ↓Foo_Bar = Void

Example #18

    private typealias ↓foo = Void

Example #19

    typealias ↓AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA = Void

Example #20

    protocol Foo {
      associatedtype ↓X
    }

Example #21

    protocol Foo {
      associatedtype ↓Foo_Bar: Equatable
    }

Example #22

    protocol Foo {
      associatedtype ↓AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    }

Environment

  • SwiftLint version (run swiftlint version to be sure)?
    0.33.1
  • Installation method used (Homebrew, CocoaPods, building from source, etc)?
    Homebrew
  • Paste your configuration file:
    Output is the same regardless of if there is a file or not.
  • Are you using nested configurations?
    No.
  • Which Xcode version are you using (check xcode-select -p)?
    10.2.1
@msalmonse
Copy link

I have found that the rules command displays the configurations but on a reasonable sized terminal that column is truncated.

@bdrelling
Copy link

Really desperate for this on our end. SwiftLint can be hard to maintain and update at times given the lack of rule and configuration discoverability. Our current process is basically to review new SwiftLint releases and audit our .swiftlint.yml file accordingly. There’s probably so much we aren’t configuring or using properly.

Thanks for all the hard work!

@jpsim
Copy link
Collaborator

jpsim commented Jan 8, 2020

Addressed in #3016.

@jpsim jpsim closed this as completed Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants