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

update to go1.23, update golangci-lint to v1.62, fix linting issues #60

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

thaJeztah
Copy link
Member

fix linting issues (revive)

clidocstool_yaml_test.go:63:60: unused-parameter: parameter 'err' seems to be unused, consider removing or renaming it as _ (revive)
    filepath.Walk(tmpdir, func(path string, info fs.FileInfo, err error) error {
                                                              ^
clidocstool_man_test.go:80:60: unused-parameter: parameter 'err' seems to be unused, consider removing or renaming it as _ (revive)
    filepath.Walk(tmpdir, func(path string, info fs.FileInfo, err error) error {
                                                              ^
clidocstool_test.go:52:31: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
        Run:                   func(cmd *cobra.Command, args []string) {},
                                    ^
clidocstool_md_test.go:65:60: unused-parameter: parameter 'err' seems to be unused, consider removing or renaming it as _ (revive)
    filepath.Walk(tmpdir, func(path string, info fs.FileInfo, err error) error {
                                                              ^
clidocstool_test.go:68:13: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
        Run: func(cmd *cobra.Command, args []string) {},
                  ^
clidocstool_test.go:89:17: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
        Run:     func(cmd *cobra.Command, args []string) {},
                      ^
clidocstool_yaml.go:80:19: unused-parameter: parameter 's' seems to be unused, consider removing or renaming it as _ (revive)
    emptyStr := func(s string) string { return "" }
                     ^

update golangci-lint to v1.62

Update config file for the new version, and removed some linters that were
deprecated and removed;

WARN The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
ERRO [linters_context] deadcode: This linter is fully inactivated: it will not produce any reports.
ERRO [linters_context] varcheck: This linter is fully inactivated: it will not produce any reports.

update to go1.23

    clidocstool_yaml_test.go:63:60: unused-parameter: parameter 'err' seems to be unused, consider removing or renaming it as _ (revive)
        filepath.Walk(tmpdir, func(path string, info fs.FileInfo, err error) error {
                                                                  ^
    clidocstool_man_test.go:80:60: unused-parameter: parameter 'err' seems to be unused, consider removing or renaming it as _ (revive)
        filepath.Walk(tmpdir, func(path string, info fs.FileInfo, err error) error {
                                                                  ^
    clidocstool_test.go:52:31: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
            Run:                   func(cmd *cobra.Command, args []string) {},
                                        ^
    clidocstool_md_test.go:65:60: unused-parameter: parameter 'err' seems to be unused, consider removing or renaming it as _ (revive)
        filepath.Walk(tmpdir, func(path string, info fs.FileInfo, err error) error {
                                                                  ^
    clidocstool_test.go:68:13: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
            Run: func(cmd *cobra.Command, args []string) {},
                      ^
    clidocstool_test.go:89:17: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
            Run:     func(cmd *cobra.Command, args []string) {},
                          ^
    clidocstool_yaml.go:80:19: unused-parameter: parameter 's' seems to be unused, consider removing or renaming it as _ (revive)
        emptyStr := func(s string) string { return "" }
                         ^

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Update config file for the new version, and removed some linters that were
deprecated and removed;

    WARN The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
    ERRO [linters_context] deadcode: This linter is fully inactivated: it will not produce any reports.
    ERRO [linters_context] varcheck: This linter is fully inactivated: it will not produce any reports.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah requested a review from crazy-max December 13, 2024 14:02
@thaJeztah thaJeztah self-assigned this Dec 13, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.73%. Comparing base (a33364e) to head (e3fec08).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #60   +/-   ##
=======================================
  Coverage   67.73%   67.73%           
=======================================
  Files           5        5           
  Lines         623      623           
=======================================
  Hits          422      422           
  Misses        139      139           
  Partials       62       62           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants