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

Feature request: add a "make lint" target #3565

Closed
8 tasks done
bnevis-i opened this issue Jun 11, 2021 · 1 comment · Fixed by #3700
Closed
8 tasks done

Feature request: add a "make lint" target #3565

bnevis-i opened this issue Jun 11, 2021 · 1 comment · Fixed by #3700
Labels
enhancement New feature or request security_audit Track issues that are related to CVE/CVSS/CWE auditing etc
Milestone

Comments

@bnevis-i
Copy link
Collaborator

bnevis-i commented Jun 11, 2021

🚀 Feature Request

Relevant Package

Global

Description

Suggest adding a "make lint" target to the top-level Makefile to point out code quality and readability issues.

This will help enforce common coding practices in the project.

golangci-lint run
golangci-lint run -E bodyclose
golangci-lint run -E cyclop
golangci-lint run -E dupl
golangci-lint run -E gochecknoglobals
golangci-lint run -E gocognit
golangci-lint run -E misspell
golangci-lint run -E nilerr
golangci-lint run -E unparam
golangci-lint run -E unconvert

Also trial enable gosec and disposition results.

Enable the following linters:

  • deadcode
  • errcheck
  • gosimple
  • ineffassign
  • staticcheck
  • unused
  • varcheck
  • gosec
@bnevis-i bnevis-i added the enhancement New feature or request label Jun 11, 2021
@bnevis-i bnevis-i added the security_audit Track issues that are related to CVE/CVSS/CWE auditing etc label Jun 18, 2021
@bnevis-i bnevis-i added this to the Jakarta milestone Jun 23, 2021
@bnevis-i
Copy link
Collaborator Author

Also have suggestion from Colin to look at https://github.com/github/super-linter

bnevis-i added a commit that referenced this issue Sep 13, 2021
…#3700)

(Only lints x86_64 because it is faster and linting on
arm64 in EdgeX CI virtual machine times out.)

Closes #3565

Signed-off-by: Bryon Nevis <[email protected]>
@bnevis-i bnevis-i reopened this Sep 14, 2021
bnevis-i added a commit that referenced this issue Sep 16, 2021
Adds the following warning message:

Addresses #3565

WARNING: go linter not installed. To install, run
  curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.42.1

WARNING: Linting skipped (not on x86_64 or linter not installed)

Signed-off-by: Bryon Nevis <[email protected]>
bnevis-i added a commit that referenced this issue Sep 29, 2021
bnevis-i added a commit that referenced this issue Sep 29, 2021
See #3565

Signed-off-by: Bryon Nevis <[email protected]>

Co-authored-by: Cloud Tsai <[email protected]>
bnevis-i added a commit that referenced this issue Sep 29, 2021
bnevis-i added a commit that referenced this issue Sep 29, 2021
bnevis-i added a commit that referenced this issue Sep 29, 2021
* style: Enable staticcheck linter and associated recommendations

See #3565

Signed-off-by: Bryon Nevis <[email protected]>

* style: Enable errcheck linter and associated recommendations

See #3565

Signed-off-by: Bryon Nevis <[email protected]>
bnevis-i added a commit that referenced this issue Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request security_audit Track issues that are related to CVE/CVSS/CWE auditing etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant