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
I'm working with the serpent library, particularly focusing on handling command-line options as defined within the command.go file of your project. I've encountered an issue that arises from the enforcement of rules concerning the format of option descriptions:
ifopt.Description!="" {
// Enforce that description uses sentence form.ifunicode.IsLower(rune(opt.Description[0])) {
merr=errors.Join(merr, xerrors.Errorf("option %q description should start with a capital letter", opt.Name))
}
if!strings.HasSuffix(opt.Description, ".") {
merr=errors.Join(merr, xerrors.Errorf("option %q description should end with a period", opt.Name))
}
}
Locatedincommand.go, thiscodeenforcesthateachoptiondescriptionstartswithacapitalletterandendswitha period. ThisrulealignswellwithdescriptionswritteninEnglish. However, itbecomesproblematicfordescriptionsinnon-Englishlanguages, especiallyforthosethatutilizenon-Latinscripts (suchasChinese, Japanese, Arabic, etc.).
ThevalidationerrorsoccurbecausethecurrentimplementationassumestheuseofEnglishsentencestructureandpunctuation, whichdoesnotuniversallyapplytoalllanguages.
The text was updated successfully, but these errors were encountered:
Hey, this is a valid problem and a vestige of the library's past presence within coder/coder. We should move this linting logic over there and be unopinionated here.
I'm working with the
serpent
library, particularly focusing on handling command-line options as defined within thecommand.go
file of your project. I've encountered an issue that arises from the enforcement of rules concerning the format of option descriptions:The text was updated successfully, but these errors were encountered: