mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-25 19:14:50 -08:00
chore(lint): remove init check
This commit is contained in:
parent
1c8347287a
commit
e5156a8d44
|
@ -8,7 +8,6 @@ linters:
|
|||
- dupl
|
||||
- errcheck
|
||||
- exhaustive
|
||||
- gochecknoinits
|
||||
- goconst
|
||||
- gocritic
|
||||
- gocyclo
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
runewidth.DefaultCondition.EastAsianWidth = false
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ You can do the following:
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
RootCmd.AddCommand(getCache)
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,6 @@ You can export, migrate or edit the config.`,
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
RootCmd.AddCommand(configCmd)
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ func cleanOutputPath(path string, env platform.Environment) string {
|
|||
return filepath.Clean(path)
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
exportCmd.Flags().StringVarP(&format, "format", "f", "json", "config format to migrate to")
|
||||
exportCmd.Flags().StringVarP(&output, "output", "o", "", "config file to export to")
|
||||
configCmd.AddCommand(exportCmd)
|
||||
|
|
|
@ -106,7 +106,7 @@ Exports the config to an image file using customized output options.`,
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
imageCmd.Flags().StringVar(&author, "author", "", "config author")
|
||||
imageCmd.Flags().StringVar(&bgColor, "background-color", "", "image background color")
|
||||
imageCmd.Flags().StringVarP(&outputImage, "output", "o", "", "image file (.png) to export to")
|
||||
|
|
|
@ -57,7 +57,7 @@ A backup of the current config can be found at ~/myconfig.omp.json.bak.`,
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
migrateCmd.Flags().BoolVarP(&write, "write", "w", false, "write the migrated config back to the config file")
|
||||
migrateCmd.Flags().StringVarP(&format, "format", "f", "json", "the config format to migrate to")
|
||||
configCmd.AddCommand(migrateCmd)
|
||||
|
|
|
@ -59,7 +59,7 @@ A backup of the current config can be found at ~/myconfig.omp.json.bak.`,
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
migrateGlyphsCmd.Flags().BoolVarP(&write, "write", "w", false, "write the migrated config back to the config file")
|
||||
migrateGlyphsCmd.Flags().StringVarP(&format, "format", "f", "", "the config format to migrate to")
|
||||
migrateCmd.AddCommand(migrateGlyphsCmd)
|
||||
|
|
|
@ -60,7 +60,7 @@ var debugCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
debugCmd.Flags().StringVar(&pwd, "pwd", "", "current working directory")
|
||||
debugCmd.Flags().StringVar(&shellName, "shell", "", "the shell to print for")
|
||||
debugCmd.Flags().BoolVarP(&plain, "plain", "p", false, "plain text output (no ANSI)")
|
||||
|
|
|
@ -22,6 +22,6 @@ var disableCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
RootCmd.AddCommand(disableCmd)
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ var enableCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
RootCmd.AddCommand(enableCmd)
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ This command is used to install fonts and configure the font in your terminal.
|
|||
}
|
||||
)
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
RootCmd.AddCommand(fontCmd)
|
||||
fontCmd.Flags().BoolVar(&user, "user", false, "install font as user")
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ This command is used to get the value of the following variables:
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
RootCmd.AddCommand(getCmd)
|
||||
getCmd.Flags().StringVar(&shellName, "shell", "", "the shell to print for")
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ See the documentation to initialize your shell: https://ohmyposh.dev/docs/instal
|
|||
}
|
||||
)
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
initCmd.Flags().BoolVarP(&printOutput, "print", "p", false, "print the init script")
|
||||
initCmd.Flags().BoolVarP(&strict, "strict", "s", false, "run in strict mode")
|
||||
initCmd.Flags().BoolVarP(&manual, "manual", "m", false, "enable/disable manual mode")
|
||||
|
|
|
@ -27,6 +27,6 @@ var noticeCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
RootCmd.AddCommand(noticeCmd)
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ var printCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
printCmd.Flags().StringVar(&pwd, "pwd", "", "current working directory")
|
||||
printCmd.Flags().StringVar(&pswd, "pswd", "", "current working directory (according to pwsh)")
|
||||
printCmd.Flags().StringVar(&shellName, "shell", "", "the shell to print for")
|
||||
|
|
|
@ -15,7 +15,7 @@ var promptCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
// legacy support
|
||||
promptCmd.AddCommand(initCmd)
|
||||
promptCmd.AddCommand(debugCmd)
|
||||
|
|
|
@ -47,7 +47,7 @@ var (
|
|||
initialize bool
|
||||
)
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
RootCmd.PersistentFlags().StringVarP(&config, "config", "c", "", "config file path")
|
||||
RootCmd.Flags().BoolVarP(&initialize, "init", "i", false, "init (deprecated)")
|
||||
RootCmd.Flags().BoolVar(&displayVersion, "version", false, "version")
|
||||
|
|
|
@ -49,6 +49,6 @@ var toggleCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
RootCmd.AddCommand(toggleCmd)
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ var versionCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
func init() { //nolint:gochecknoinits
|
||||
func init() {
|
||||
versionCmd.Flags().BoolVarP(&verbose, "verbose", "v", false, "write verbose output")
|
||||
RootCmd.AddCommand(versionCmd)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue