mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-17 16:38:54 +00:00
yet more staticcheck
This commit is contained in:
parent
718ec1685a
commit
ed84aeb300
15 changed files with 4 additions and 17 deletions
2
Makefile
2
Makefile
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue