Skip to content

Commit d205705

Browse files
authored
Fix some linting errors (#89)
1 parent 5ab6739 commit d205705

33 files changed

+237
-68
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Bug Report
22
description: Report a bug or an unexpected behavior
33
labels: ["bug", "needs-triage"]
4-
assignees: []
54
body:
65
- type: markdown
76
attributes:

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Feature Request
22
description: Suggest an idea or enhancement for the project.
33
labels: ["enhancement", "needs-triage"]
4-
assignees: []
54
body:
65
- type: markdown
76
attributes:

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,6 @@ secrets.dev.toml
4747
docs/commands/
4848

4949
# Any Python virtual environments
50-
.venv/
50+
.venv/
51+
# Added by goreleaser init:
52+
dist/

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ We encourage contributions via GitHub pull requests. Before you start, please re
3030
git checkout -b your-feature-or-bugfix-branch
3131
```
3232
1. **Make your changes.**
33-
1. **Format and Lint:** Ensure your code is formatted using [gofumpt](https://github.com/mvdan/gofumpt).
33+
1. **Format and Lint:** Ensure your code is formatted using [gofumpt](https://github.com/mvdan/gofumpt) and [golangci-lint run ./...](https://golangci-lint.run/welcome/install/).
3434
1. **Add Unit Tests:** All new features and bug fixes should be accompanied by relevant unit tests.
3535
1. **Commit your changes** with a clear and descriptive message.
3636
1. **Push your branch** to your forked repository.

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This document outlines the process for reporting vulnerabilities in `mcpd`.
1111
The following versions are currently supported for security updates:
1212

1313
| Version | Supported |
14-
| ------- | ------------------ |
14+
|---------|--------------------|
1515
| 0.0.x | :white_check_mark: |
1616

1717
**Please ensure you are using a supported version when reporting a vulnerability.**

cmd/add_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func (f *fakeConfig) AddServer(entry config.ServerEntry) error {
3131
return nil
3232
}
3333

34-
func (f *fakeConfig) RemoveServer(name string) error {
34+
func (f *fakeConfig) RemoveServer(_ string) error {
3535
return nil
3636
}
3737

@@ -44,7 +44,7 @@ type fakeLoader struct {
4444
err error
4545
}
4646

47-
func (f *fakeLoader) Load(path string) (config.Modifier, error) {
47+
func (f *fakeLoader) Load(_ string) (config.Modifier, error) {
4848
return f.cfg, f.err
4949
}
5050

cmd/config/args/clear.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ func (c *ClearCmd) run(cmd *cobra.Command, args []string) error {
7575
return fmt.Errorf("error clearing arguments for server '%s': %w", serverName, err)
7676
}
7777

78-
fmt.Fprintf(cmd.OutOrStdout(), "✓ Arguments cleared for server '%s' (operation: %s)\n", serverName, string(res))
78+
if _, err := fmt.Fprintf(
79+
cmd.OutOrStdout(),
80+
"✓ Arguments cleared for server '%s' (operation: %s)\n", serverName, string(res),
81+
); err != nil {
82+
return err
83+
}
7984

8085
return nil
8186
}

cmd/config/args/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func NewListCmd(baseCmd *cmd.BaseCmd, opt ...options.CmdOption) (*cobra.Command,
4040
return cobraCmd, nil
4141
}
4242

43-
func (c *ListCmd) run(cmd *cobra.Command, args []string) error {
43+
func (c *ListCmd) run(_ *cobra.Command, args []string) error {
4444
serverName := strings.TrimSpace(args[0])
4545
if serverName == "" {
4646
return fmt.Errorf("server-name is required")

cmd/config/args/remove.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@ func (c *RemoveCmd) run(cmd *cobra.Command, args []string) error {
7878
return fmt.Errorf("error removing arguments for server '%s': %w", serverName, err)
7979
}
8080

81-
fmt.Fprintf(cmd.OutOrStdout(), "✓ Arguments removed for server '%s' (operation: %s): %v\n", serverName, string(res), slices.Collect(maps.Keys(argMap)))
81+
if _, err := fmt.Fprintf(
82+
cmd.OutOrStdout(),
83+
"✓ Arguments removed for server '%s' (operation: %s): %v\n", serverName, string(res), slices.Collect(maps.Keys(argMap)),
84+
); err != nil {
85+
return err
86+
}
8287

8388
return nil
8489
}

cmd/config/args/set.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ func (c *SetCmd) run(cmd *cobra.Command, args []string) error {
8080
return fmt.Errorf("error setting arguments for server '%s': %w", serverName, err)
8181
}
8282

83-
fmt.Fprintf(cmd.OutOrStdout(), "✓ Startup arguments set for server '%s' (operation: %s): %v\n", serverName, string(res), normalizedArgs)
83+
if _, err := fmt.Fprintf(
84+
cmd.OutOrStdout(),
85+
"✓ Startup arguments set for server '%s' (operation: %s): %v\n", serverName, string(res), normalizedArgs,
86+
); err != nil {
87+
return err
88+
}
8489

8590
return nil
8691
}

0 commit comments

Comments
 (0)