realm/SwiftLint

Feature request: Add an option that changes behavior depending on whether attributes have arguments

Open

#5.011 geöffnet am 15. Mai 2023

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Swift (2.295 Forks)batch import
enhancementgood first issue

Repository-Metriken

Stars
 (19.570 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 16T 3h) (37 gemergte PRs in 30 T)

Beschreibung

New Issue Checklist

New feature request

The attributes_with_arguments_always_on_line_above option which has added to the attributes rule in version 0.52.0 is only working for variables and imports. I think it would be nice if there was a way to work for functions and types as well.

In the current version, variables and imports can change the behavior of the attributes rule depending on whether their attributes have arguments, but functions and types cannot. I think it would be nice if they had a way to do the same.

An use case:

@objc(Foo)
class Foo: NSObject {
    @objc func foo() {}
}

ref. Google's Swift Style Guide

Contributor Guide