8000 Rename `NoteMessage.fixItID` to `noteID` · swiftlang/swift-syntax@2412468 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2412468

Browse files
committed
Rename NoteMessage.fixItID to noteID
1 parent 9f09285 commit 2412468

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

Sources/SwiftDiagnostics/Note.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ public protocol NoteMessage {
2020
var message: String { get }
2121

2222
/// See ``MessageID``.
23-
var fixItID: MessageID { get }
23+
var noteID: MessageID { get }
24+
}
25+
26+
extension NoteMessage {
27+
@available(*, deprecated, message: "Use noteID instead.", renamed: "noteID")
28+
public var fixItID: MessageID {
29+
return noteID
30+
}
2431
}
2532

2633
/// A note that points to another node that's relevant for a Diagnostic.

Sources/SwiftParserDiagnostics/ParserDiagnosticMessages.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,21 @@ public extension ParserError {
3636
}
3737

3838
public protocol ParserNote: NoteMessage {
39-
var fixItID: MessageID { get }
39+
var noteID: MessageID { get }
4040
}
4141

4242
public extension ParserNote {
43+
@available(*, deprecated, message: "Use noteID instead.", renamed: "noteID")
4344
static var fixItID: MessageID {
45+
return Self.noteID
46+
}
47+
48+
static var noteID: MessageID {
4449
return MessageID(domain: diagnosticDomain, id: "\(self)")
4550
}
4651

47-
var fixItID: MessageID {
48-
return Self.fixItID
52+
var noteID: MessageID {
53+
return Self.noteID
4954
}
5055
}
5156

@@ -594,7 +599,7 @@ public struct StaticParserNote: NoteMessage {
594599
self.messageID = messageID
595600
}
596601

597-
public var fixItID: MessageID {
602+
public var noteID: MessageID {
598603
MessageID(domain: diagnosticDomain, id: "\(type(of: self)).\(messageID)")
599604
}
600605
}

0 commit comments

Comments
 (0)
0