Add example verifying that `trailing_semicolon` works with trailing comments (#4808)

This commit is contained in:
Danny Mösch 2023-03-11 14:29:38 +01:00 committed by GitHub
parent 1bf2f25e40
commit bd77cbcf6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,8 @@ struct TrailingSemicolonRule: SwiftSyntaxCorrectableRule, ConfigurationProviderR
],
triggeringExamples: [
Example("let a = 0↓;\n"),
Example("let a = 0↓;\nlet b = 1\n")
Example("let a = 0↓;\nlet b = 1\n"),
Example("let a = 0↓; // a comment\n")
],
corrections: [
Example("let a = 0↓;\n"): Example("let a = 0\n"),