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

RedundantTypeAnnotation: add 'ignore_type_interfaces' option #5839

Merged
merged 3 commits into from
Nov 12, 2024

Commits on Nov 12, 2024

  1. RedundantTypeAnnotation: add 'ignore_type_interfaces' option

    The `redundant_type_annotation` and `explicit_type_interface` rules conflict.
    For users that want to have an explicit type interface, but still be able to write
    simple code inside the bodies of functions, I want to add an option to
    `redundant_type_annotation` that has it ignore "type interfaces".
    
    For example, this allows:
    ```
    struct Foo {
        var bar: Bar = Bar() // OK: ignore this! I want explicit types on interfaces.
        func baz() {
           let bar: Bar = Bar() // WARN: redundant_type_annotation kicks in here though.
        }
    }
    ```
    Jared Grubb authored and SimplyDanny committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    325c4ff View commit details
    Browse the repository at this point in the history
  2. - address review comments

    Jared Grubb authored and SimplyDanny committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    a81abc5 View commit details
    Browse the repository at this point in the history
  3. Retrigger build

    SimplyDanny committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    ecb3500 View commit details
    Browse the repository at this point in the history