Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
calda authored and nicklockwood committed Sep 28, 2024
1 parent cd7b93f commit 7d56fcc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
9 changes: 5 additions & 4 deletions Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
* [redundantBackticks](#redundantBackticks)
* [redundantBreak](#redundantBreak)
* [redundantClosure](#redundantClosure)
* [redundantEquatable](#redundantEquatable)
* [redundantExtensionACL](#redundantExtensionACL)
* [redundantFileprivate](#redundantFileprivate)
* [redundantGet](#redundantGet)
Expand Down Expand Up @@ -107,6 +106,7 @@
* [organizeDeclarations](#organizeDeclarations)
* [privateStateVariables](#privateStateVariables)
* [propertyType](#propertyType)
* [redundantEquatable](#redundantEquatable)
* [redundantProperty](#redundantProperty)
* [sortSwitchCases](#sortSwitchCases)
* [spacingGuards](#spacingGuards)
Expand Down Expand Up @@ -1843,14 +1843,15 @@ a hand-written Equatable conformance:
+ import MyMacroLib

+ @Equatable
+ class Bar {
- class Bar: Equatable {
class Bar {
let baaz: Baaz
}

- extension Bar: Equatable {
- static func ==(lhs: Bar, rhs: Bar) -> Bool {
- lhs.baaz == rhs.baaz
- }
}
- }
```

</details>
Expand Down
2 changes: 1 addition & 1 deletion Sources/DeclarationHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ enum Declaration: Hashable {
}
}

/// The name of this type or variable, which always follows the
/// The name of this type or variable
var name: String? {
let parser = Formatter(openTokens)
guard let keywordIndex = openTokens.firstIndex(of: .keyword(keyword)),
Expand Down
1 change: 0 additions & 1 deletion Sources/Rules/RedundantEquatable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ extension Formatter {
/// Adds imports for the given list of modules to this file if not already present
func addImports(_ importsToAddIfNeeded: Set<String>) {
let importRanges = parseImports()
let firstImport = importRanges.first?.first
let currentImports = Set(importRanges.flatMap { $0.map(\.module) })

for importToAddIfNeeded in importsToAddIfNeeded {
Expand Down

0 comments on commit 7d56fcc

Please sign in to comment.