ci/cd: add basic static analysis for backend (#389)

This commit is contained in:
Rich
2025-03-27 08:13:56 -07:00
committed by GitHub
parent 4d049bbe24
commit 4ac1196d8d
8 changed files with 67 additions and 9 deletions

View File

@@ -170,7 +170,7 @@ func (c *Composer) String() string {
func convertRunes(str string) []string {
var enc = make([]string, 0, len(str))
for _, r := range []rune(str) {
for _, r := range str {
if r == ' ' {
enc = append(enc, "_")
} else if isPrintableASCIIRune(r) &&
@@ -204,7 +204,7 @@ func hex(n byte) byte {
}
func isPrintableASCII(str string) bool {
for _, r := range []rune(str) {
for _, r := range str {
if !unicode.IsPrint(r) || r >= unicode.MaxASCII {
return false
}