-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduces an extra job to the linting stage, which uses swiftlint to validate Localizable.strings files in the Strings package.
- Loading branch information
Showing
4 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
realm/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
only_rules: | ||
- custom_rules | ||
|
||
included: doesn't seem to work, so these input files have to be passed during the swiftlint invocation | ||
- Sources/Strings/Resources/*/Localizable.strings | ||
|
||
custom_rules: | ||
malformed_entry: | ||
regex: '^(?!($|(\/\* [^\n]* \*\/$)|(\"[^\n]*\" = \"[^\n]*\";$)|(\/\/)))' | ||
message: "Each line should be either a comment or translation" | ||
severity: error | ||
leaky_block_comment: | ||
regex: '^\/\*[^\n]*\*\/[^\n]' | ||
message: "Block comments should not have any characters after the closing brace" | ||
severity: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
mint run swiftlint --config libraries/Strings/.swiftlint.yml libraries/Strings/Sources/Strings/Resources/*.lproj/Localizable.strings | ||
|