mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-26 12:13:57 +00:00
fix(build): actually enforce masked prefixes verification in lint-locale-usage
This commit is contained in:
parent
560eb35a85
commit
f2bb2016e1
3 changed files with 52 additions and 4 deletions
|
@ -273,8 +273,10 @@ func main() {
|
|||
|
||||
handler := Handler{
|
||||
OnMsgidPrefix: func(fset *token.FileSet, pos token.Pos, msgidPrefix string) {
|
||||
// TODO: perhaps we should check if we have any strings with such a prefix, but that's slow...
|
||||
allowedMaskedPrefixes.Insert(DecodeKeyForStm(msgidPrefix))
|
||||
if !allowedMaskedPrefixes.Matches(DecodeKeyForStm(msgidPrefix)) {
|
||||
gotAnyMsgidError = true
|
||||
fmt.Printf("%s:\tmissing msgid prefix: %s\n", fset.Position(pos).String(), msgidPrefix)
|
||||
}
|
||||
},
|
||||
OnMsgid: func(fset *token.FileSet, pos token.Pos, msgid string) {
|
||||
if !msgids.Contains(msgid) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue