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 Request: Alphabetise struct property let / vars. #5541

Open
2 tasks done
JulesMoorhouse opened this issue Apr 24, 2024 · 0 comments
Open
2 tasks done

Rule Request: Alphabetise struct property let / vars. #5541

JulesMoorhouse opened this issue Apr 24, 2024 · 0 comments
Labels
rule-request Requests for a new rules.

Comments

@JulesMoorhouse
Copy link

New Issue Checklist

New rule request

Sort let and var propery name alapbetically. However, exclude SwiftUI Views as this would cause an issue with trailing closure syntax. Also id and identifier should be allowed as first items

Triggering:

public struct EmailViewItems: Identifiable {
    public let id = UUID()
    public let button: String
    public let appName: String
    public let address: String

public struct EmailViewItems {
    public let button: String
    public let appName: String
    public let address: String
    public let id = UUID()

Non-triggering:

public struct EmailViewItems: Identifiable {
    public let id = UUID()
    public let appName: String
    public let address: String
    public let button: String

public struct EmailViewItems {
    public let id = UUID()
    public let appName: String
    public let address: String
    public let button: String
    
struct Icon: View {
    private var image: Image
    private var width: CGFloat
    private var height: CGFloat
@SimplyDanny SimplyDanny added the rule-request Requests for a new rules. label Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule-request Requests for a new rules.
Projects
None yet
Development

No branches or pull requests

2 participants