yet more staticcheck

This commit is contained in:
John Kerl 2026-03-03 10:17:01 -05:00
parent 718ec1685a
commit ed84aeb300
15 changed files with 4 additions and 17 deletions

View file

@ -77,7 +77,7 @@ fmt format:
# Needs first: go install honnef.co/go/tools/cmd/staticcheck@latest
# See also: https://staticcheck.io
staticcheck:
staticcheck ./...
staticcheck ./pkg/... ./cmd/mlr/...
# ----------------------------------------------------------------
# For developers before pushing to GitHub.

View file

@ -54,10 +54,10 @@ func transformerAltkvParseCLI(
if opt == "-h" || opt == "--help" {
transformerAltkvUsage(os.Stdout)
return nil, cli.ErrHelpRequested
} else {
transformerAltkvUsage(os.Stderr)
return nil, fmt.Errorf("%s %s: option \"%s\" not recognized", "mlr", verbNameAltkv, opt)
}
transformerAltkvUsage(os.Stderr)
//lint:ignore SA4004 loop is intentionally structured this way
return nil, fmt.Errorf("%s %s: option \"%s\" not recognized", "mlr", verbNameAltkv, opt)
}
*pargi = argi

View file

@ -59,7 +59,6 @@ func transformerCheckParseCLI(
return nil, cli.ErrHelpRequested
} else {
//lint:ignore SA4004 loop is intentionally structured this way
return nil, cli.VerbErrorf(verbNameCheck, "option \"%s\" not recognized", opt)
}
}

View file

@ -55,7 +55,6 @@ func transformerGroupByParseCLI(
return nil, cli.ErrHelpRequested
} else {
//lint:ignore SA4004 loop is intentionally structured this way
return nil, cli.VerbErrorf(verbNameGroupBy, "option \"%s\" not recognized", opt)
}
}

View file

@ -55,7 +55,6 @@ func transformerGroupLikeParseCLI(
return nil, cli.ErrHelpRequested
} else {
//lint:ignore SA4004 loop is intentionally structured this way
return nil, cli.VerbErrorf(verbNameGroupLike, "option \"%s\" not recognized", opt)
}
}

View file

@ -59,7 +59,6 @@ func transformerLabelParseCLI(
return nil, cli.ErrHelpRequested
} else {
//lint:ignore SA4004 loop is intentionally structured this way
return nil, cli.VerbErrorf(verbNameLabel, "option \"%s\" not recognized", opt)
}
}

View file

@ -57,7 +57,6 @@ func transformerLatin1ToUTF8ParseCLI(
return nil, cli.ErrHelpRequested
} else {
//lint:ignore SA4004 loop is intentionally structured this way
return nil, cli.VerbErrorf(verbNameLatin1ToUTF8, "option \"%s\" not recognized", opt)
}
}

View file

@ -55,7 +55,6 @@ func transformerNothingParseCLI(
return nil, cli.ErrHelpRequested
} else {
transformerNothingUsage(os.Stderr)
//lint:ignore SA4004 loop is intentionally structured this way
return nil, fmt.Errorf("%s %s: option \"%s\" not recognized", "mlr", verbNameNothing, opt)
}
}

View file

@ -56,7 +56,6 @@ func transformerRegularizeParseCLI(
return nil, cli.ErrHelpRequested
} else {
//lint:ignore SA4004 loop is intentionally structured this way
return nil, cli.VerbErrorf(verbNameRegularize, "option \"%s\" not recognized", opt)
}
}

View file

@ -55,7 +55,6 @@ func transformerRemoveEmptyColumnsParseCLI(
return nil, cli.ErrHelpRequested
} else {
//lint:ignore SA4004 loop is intentionally structured this way
return nil, cli.VerbErrorf(verbNameRemoveEmptyColumns, "option \"%s\" not recognized", opt)
}
}

View file

@ -58,7 +58,6 @@ func transformerSec2GMTDateParseCLI(
return nil, cli.ErrHelpRequested
} else {
//lint:ignore SA4004 loop is intentionally structured this way
return nil, cli.VerbErrorf(verbNameSec2GMTDate, "option \"%s\" not recognized", opt)
}
}

View file

@ -58,7 +58,6 @@ func transformerShuffleParseCLI(
return nil, cli.ErrHelpRequested
} else {
//lint:ignore SA4004 loop is intentionally structured this way
return nil, cli.VerbErrorf(verbNameShuffle, "option \"%s\" not recognized", opt)
}
}

View file

@ -55,7 +55,6 @@ func transformerSkipTrivialRecordsParseCLI(
return nil, cli.ErrHelpRequested
} else {
//lint:ignore SA4004 loop is intentionally structured this way
return nil, cli.VerbErrorf(verbNameSkipTrivialRecords, "option \"%s\" not recognized", opt)
}
}

View file

@ -54,7 +54,6 @@ func transformerTacParseCLI(
return nil, cli.ErrHelpRequested
} else {
//lint:ignore SA4004 loop is intentionally structured this way
return nil, cli.VerbErrorf(verbNameTac, "option \"%s\" not recognized", opt)
}
}

View file

@ -57,7 +57,6 @@ func transformerUTF8ToLatin1ParseCLI(
return nil, cli.ErrHelpRequested
} else {
//lint:ignore SA4004 loop is intentionally structured this way
return nil, cli.VerbErrorf(verbNameUTF8ToLatin1, "option \"%s\" not recognized", opt)
}
}