Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lint issues #197

Merged
merged 1 commit into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .golangci-soft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,13 @@ issues:

linters:
enable:
# - dupl
- exhaustive
# - exhaustivestruct
- goconst
- godot
- godox
- gomnd
- gomoddirectives
- goprintffuncname
- ifshort
# - lll
- misspell
- nakedret
- nestif
Expand Down
3 changes: 1 addition & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/log"
"github.com/muesli/termenv"
"golang.org/x/crypto/ssh"
gossh "golang.org/x/crypto/ssh"
)

Expand Down Expand Up @@ -66,7 +65,7 @@ func shellAndWait(session *gossh.Session) error {
return fmt.Errorf("failed to start shell: %w", err)
}
if err := session.Wait(); err != nil {
if errors.Is(err, &ssh.ExitMissingError{}) {
if errors.Is(err, &gossh.ExitMissingError{}) {
log.Info("exit was missing, assuming exit 0")
return nil
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/wishlist/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ It's also possible to serve the TUI over SSH using the server command.
CompletionOptions: cobra.CompletionOptions{
HiddenDefaultCmd: true,
},
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
cache, err := os.UserCacheDir()
if err != nil {
return fmt.Errorf("could not create log file: %w", err)
Expand Down Expand Up @@ -92,7 +92,7 @@ var manCmd = &cobra.Command{
Short: "generate man pages",
Hidden: true,
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
manPage, err := mcobra.NewManPage(1, rootCmd)
if err != nil {
return fmt.Errorf("could not generate man pages: %w", err)
Expand All @@ -109,7 +109,7 @@ var serverCmd = &cobra.Command{
Aliases: []string{"server", "s"},
Args: cobra.NoArgs,
Short: "Serve the TUI over SSH.",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
seed, err := getSeedEndpoints()
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type EndpointHint struct {
}

// Authentications returns either the client preferred authentications or the
// default publickey,keyboard-interactive
// default publickey,keyboard-interactive.
func (e Endpoint) Authentications() []string {
if len(e.PreferredAuthentications) == 0 {
return []string{authModePublicKey, authModeKeyboardInteractive}
Expand Down