You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accept .strings comments between a statement's tokens
`StringsFileValidationHelper`'s tokenizer only recognized comments in its `:root`
context, so a comment placed between the tokens of a statement — `"key" /* note */ =
"value";`, `"key" = /* note */ "value";`, or `"key" = "value" /* note */;` — raised
`Invalid character` even though `plutil` accepts all three.
The scanner now carries a `resume_context` so a comment returns to the state it
interrupted instead of always dropping back to `:root`. The one ambiguous position —
a `/` right after `=`, which could begin a comment or a `/usr/bin`-style unquoted
value — is disambiguated one character later via a new `:maybe_comment_or_value`
state, so `/`-leading unquoted values still parse.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ _None_
15
15
### Bug Fixes
16
16
17
17
-`StringsFileValidationHelper.find_duplicated_keys` now parses *unquoted* keys and values (valid `.strings` syntax, common in `InfoPlist.strings`) instead of raising `Invalid character`, matching the character set `plutil` accepts for unquoted strings (alphanumerics plus `_ . - $ : /`). This lets `ios_lint_localizations`' `check_duplicate_keys` work on `InfoPlist.strings`-style files. [#741]
18
+
-`StringsFileValidationHelper.find_duplicated_keys` now also accepts comments placed *between* the tokens of a statement (e.g. `"key" /* note */ = "value";`), which `plutil` allows, instead of raising `Invalid character` on the `/`. [#741]
18
19
-`ios_lint_localizations`' `check_duplicate_keys` no longer crashes the lane on a file that parses as a property list but isn't a flat `.strings` (e.g. a nested-dictionary value); it now warns via `UI.important` and skips that file. [#741]
0 commit comments