Skip to content

Commit

Permalink
Exclude deprecated rule options from Rules.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood committed Jun 9, 2024
1 parent f8622a9 commit 7d6174d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -2586,7 +2586,6 @@ Option | Description
--- | ---
`--funcattributes` | Function @attributes: "preserve", "prev-line", or "same-line"
`--typeattributes` | Type @attributes: "preserve", "prev-line", or "same-line"
`--varattributes` | Property @attributes: "preserve", "prev-line", or "same-line"
`--storedvarattrs` | Stored var @attribs: "preserve", "prev-line", or "same-line"
`--computedvarattrs` | Computed var @attribs: "preserve", "prev-line", "same-line"

Expand Down
7 changes: 5 additions & 2 deletions Tests/MetadataTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ class MetadataTests: XCTestCase {
if !rule.options.isEmpty {
result += "\n\nOption | Description\n--- | ---"
for option in rule.options {
let help = Descriptors.byName[option]!.help
result += "\n`--\(option)` | \(help)"
let descriptor = Descriptors.byName[option]!
guard !descriptor.isDeprecated else {
continue
}
result += "\n`--\(option)` | \(descriptor.help)"
}
}
if let examples = rule.examples {
Expand Down

0 comments on commit 7d6174d

Please sign in to comment.