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 legacy linting issues #24

Closed
2 tasks
neilotoole opened this issue Nov 10, 2023 · 3 comments
Closed
2 tasks

Fix legacy linting issues #24

neilotoole opened this issue Nov 10, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@neilotoole
Copy link
Owner

PR #23 enables golangci-lint linting in a GH workflow. There's a bunch of lint issues (e.g. see this run). Until the lint issues are addressed, the lint config (.github/workflows/golangci-lint.yml) doesn't fail the workflow (--issues-exit-code=0).

  • Fix lint issues
  • Set lint workflow to fail on any lint issues
@neilotoole neilotoole added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Nov 10, 2023
@dreamjz
Copy link
Contributor

dreamjz commented Nov 10, 2023

I'll solve this.
Perhaps we can disable reporting long lines(lll) for golangci-lint ?
I feel this may not be entirely necessary

@neilotoole
Copy link
Owner Author

neilotoole commented Nov 11, 2023

@dreamjz Go for it!

Agreed re long lines.

Feel free to adjust other linters if it makes sense. The linting config obviously hasn't been tuned yet.

neilotoole added a commit that referenced this issue Nov 15, 2023
* fix(fix-legacy-linting-issues): Disable long line reporting and exhaustiveness checking

* fix(fix-legacy-linting-issues): fix format linting issue

Update codec.go

* fix(fix-legacy-linting-issues): modify statements

Update codec.go

Update codec.go

modify statement

* fix(fix-legacy-linting-issues): fix declaration shadowing


* fix(fix-legacy-linting-issues): rewirte single type-switch

Update codec.go

* fix(fix-legacy-linting-issues): fix unused code

fix unused

fix(fix-legacy-linting-issues): fix unused code

Update jsoncolor.go

* fix(fix-legacy-linting-issues): Rewrite syntaxError, Remove init function and global variable "syntaxErrorMsgOffset"

* fix(fix-legacy-linting-issues): Display line number in golangci-lint action output

* fix(fix-legacy-linting-issues): golangci-lint exti when failed

* fix(fix-legacy-linting-issues): fix naked return

* fix(fix-legacy-linting-issues): fix redefines builtin function

* fix(fix-legacy-linting-issues): Use errors.As to check for specific errors

* fix(fix-legacy-linting-issues): Use errors.Is to check for a specific error

* fix(fix-legacy-linting-issues): fix indent-error-flow

* fix(fix-legacy-linting-issues): No value of int64 less than MinInt64 or greater than MaxInt64

* fix(fix-legacy-linting-issues): unnecessary conversion (unconvert)

* fix(fix-legacy-linting-issues): Error return value is not checked

* fix(fix-legacy-linting-issues): Implicit memory aliasing in for loop

* fix(fix-legacy-linting-issues): fix gofumpt linting issue

* fix(fix-legacy-linting-issues): Fix duplicate line

* fix(fix-legacy-linting-issues): Remove deprecated and unused funtion

* fix(fix-legacy-linting-issues): Fix function "appendStructFields" is too long

* - Cleaned up some typos.
- Consolidated use of err/err2 names for multiple error variables.

* fix(fix-legacy-linting-issues): Remove all unused code

* fix(fix-legacy-linting-issues): Rename function name to make it more clearer

* Rename function name

---------

Co-authored-by: neilotoole <neilotoole@apache.org>
@neilotoole
Copy link
Owner Author

Linter reports no issues, closing issue. Thanks @dreamjz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants