Skip to content

Commit

Permalink
Add support for SwiftLint 0.53.0 rules (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelfoppolo authored Feb 23, 2024
1 parent 7cef6b3 commit fb56a00
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
24 changes: 24 additions & 0 deletions swift-lang/src/main/resources/swiftlint/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -1838,5 +1838,29 @@
"description": "Default or memberwise initializers that will be automatically synthesized do not need to be manually defined.",
"type": "CODE_SMELL",
"debt": "5min"
},
{
"key": "non_overridable_class_declaration",
"name": "Class Declaration in Final Class",
"severity": "MINOR",
"description": "Class methods and properties in final classes should themselves be final, just as if the declarations",
"type": "CODE_SMELL",
"debt": "5min"
},
{
"key": "private_swiftui_state",
"name": "Private SwiftUI State Properties",
"severity": "MAJOR",
"description": "SwiftUI state properties should be private",
"type": "CODE_SMELL",
"debt": "5min"
},
{
"key": "unneeded_override",
"name": "Unneeded Overridden Functions",
"severity": "MINOR",
"description": "Remove overridden functions that don't do anything except call their super",
"type": "CODE_SMELL",
"debt": "5min"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void define() {
assertThat(builtProfile).isNotNull();
assertThat(builtProfile.language()).isEqualTo(swift.getKey());
assertThat(builtProfile.name()).isEqualTo(swift.getName());
assertThat(builtProfile.rules()).hasSize(260);
assertThat(builtProfile.rules()).hasSize(263);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ public void define() {
assertThat(repository).isNotNull();
assertThat(repository.name()).isEqualTo("SwiftLint");
assertThat(repository.language()).isEqualTo(language.getKey());
assertThat(repository.rules()).hasSize(230);
assertThat(repository.rules()).hasSize(233);
}
}

0 comments on commit fb56a00

Please sign in to comment.