feat: add actionable message on lint-locale failure (#12748)
Before this PR:  After this PR:  Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12748 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: Ellen Εμίλια Άννα Zscheile <fogti@noreply.codeberg.org>
This commit is contained in:
@@ -191,5 +191,24 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
if exitCode != 0 {
|
||||
fmt.Println(dmp.DiffPrettyText([]diffmatchpatch.Diff{{
|
||||
Type: diffmatchpatch.DiffEqual,
|
||||
Text: "Please adjust the locale files as suggested above (",
|
||||
}, {
|
||||
Type: diffmatchpatch.DiffDelete,
|
||||
Text: "red",
|
||||
}, {
|
||||
Type: diffmatchpatch.DiffEqual,
|
||||
Text: ": removal, ",
|
||||
}, {
|
||||
Type: diffmatchpatch.DiffInsert,
|
||||
Text: "green",
|
||||
}, {
|
||||
Type: diffmatchpatch.DiffEqual,
|
||||
Text: ": insertion)",
|
||||
}}))
|
||||
}
|
||||
|
||||
os.Exit(exitCode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user