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 linter config and fix lint issues #71

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

xcoulon
Copy link
Contributor

@xcoulon xcoulon commented Sep 4, 2024

WARN [lintersdb] The linter "golint" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
WARN [lintersdb] The linter "scopelint" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
WARN [lintersdb] The linter named "megacheck" is deprecated. It has been split into: gosimple, staticcheck, unused.

and

pkg/ioutils/terminal.go:107:51: printf: non-constant format string in call to (*github.com/kubesaw/ksctl/pkg/ioutils.DefaultTerminal).PrintContextSeparatorWithBodyf (govet)
        t.PrintContextSeparatorWithBodyf(string(result), title)
                                                         ^
pkg/cmd/generate/cli_configs.go:252:42: G115: integer overflow conversion uint -> int64 (gosec)
                        ExpirationSeconds: pointer.Int64(int64(tokenExpirationDays * 24 * 60 * 60)),
                                                              ^
pkg/cmd/adm/must_gather_namespace_test.go:97:3: formatter: remove unnecessary fmt.Sprintf (testifylint)
                require.NoError(t, err, fmt.Sprintf("'%s' is missing", filename))

```
WARN [lintersdb] The linter "golint" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
WARN [lintersdb] The linter "scopelint" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
WARN [lintersdb] The linter named "megacheck" is deprecated. It has been split into: gosimple, staticcheck, unused.
```

and

```
pkg/ioutils/terminal.go:107:51: printf: non-constant format string in call to (*github.com/kubesaw/ksctl/pkg/ioutils.DefaultTerminal).PrintContextSeparatorWithBodyf (govet)
        t.PrintContextSeparatorWithBodyf(string(result), title)
                                                         ^
pkg/cmd/generate/cli_configs.go:252:42: G115: integer overflow conversion uint -> int64 (gosec)
                        ExpirationSeconds: pointer.Int64(int64(tokenExpirationDays * 24 * 60 * 60)),
                                                              ^
pkg/cmd/adm/must_gather_namespace_test.go:97:3: formatter: remove unnecessary fmt.Sprintf (testifylint)
                require.NoError(t, err, fmt.Sprintf("'%s' is missing", filename))
```
Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
Copy link
Contributor

@MatousJobanek MatousJobanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@xcoulon xcoulon merged commit 43eb3db into kubesaw:master Sep 4, 2024
6 of 7 checks passed
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 69.61%. Comparing base (fd7b434) to head (e430f08).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pkg/cmd/generate/cli_configs.go 50.00% 1 Missing ⚠️
pkg/ioutils/terminal.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master      #71   +/-   ##
=======================================
  Coverage   69.61%   69.61%           
=======================================
  Files          43       43           
  Lines        2564     2564           
=======================================
  Hits         1785     1785           
  Misses        588      588           
  Partials      191      191           
Files with missing lines Coverage Δ
pkg/cmd/generate/cli_configs.go 74.65% <50.00%> (ø)
pkg/ioutils/terminal.go 61.11% <0.00%> (ø)

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.

3 participants