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 lint errors #2245

Closed
1 task
metskem opened this issue Jan 24, 2022 · 6 comments
Closed
1 task

fix lint errors #2245

metskem opened this issue Jan 24, 2022 · 6 comments

Comments

@metskem
Copy link
Contributor

metskem commented Jan 24, 2022

Please fill out the issue checklist below and provide ALL the requested information.

  • [x ] I reviewed open and closed github issues that may be related to my problem.
  • [x ] I tried updating to the latest version of the CF CLI to see if it fixed my problem.
  • I attempted to run the command with CF_TRACE=1 to help debug the issue.
  • [x ] I am reporting a bug that others will be able to reproduce.

Describe the bug and the command you saw an issue with
I just started checking out the cf-cli source, and wanted to first build the master branch without making any changes. But that failed on a couple of lint errors.

I created a local branch and fixed the errors. Do you want a PR?

What happened
I ran "make", which runs the lint make target. That target failed with several lint errors (imports ordering/grouping, redundant null check, unhandled errors)

Expected behavior
I expect the master branch of a project not to have such (lint) errors.

Exact Steps To Reproduce

  • cd into the project
  • run "make" or "make lint"

Provide more context
I did the test on the master branch

Notes regarding V6 and V7 CLI support:
N/A

@a-b
Copy link
Member

a-b commented Jan 24, 2022

Can you please provide additional context about your environment?
It would be helpful to know what version of go lang you are using and the exact error messages.

@metskem
Copy link
Contributor Author

metskem commented Jan 24, 2022

My golang version is "go version go1.16.3 darwin/amd64".
And I am getting the following lint errors (running "make lint":

Running custom linters...
bash -c "go run bin/style/main.go api util"
util/ui/ui.go +292 method UI.DisplayDiffAddition defined after function getIndent
util/ui/ui.go +313 method UI.DisplayDiffRemoval defined after function getIndent
util/ui/ui.go +334 method UI.DisplayDiffUnchanged defined after function getIndent
util/ui/ui.go +355 method UI.DisplayJSON defined after function getIndent
util/ui/ui.go +380 method UI.FlushDeferred defined after function getIndent
util/ui/ui.go +391 method UI.GetErr defined after function getIndent
util/ui/ui.go +396 method UI.GetIn defined after function getIndent
util/ui/ui.go +401 method UI.GetOut defined after function getIndent
util/ui/ui.go +408 method UI.TranslateText defined after function getIndent
util/ui/ui.go +413 method UI.UserFriendlyDate defined after function getIndent
util/ui/ui.go +418 method UI.Writer defined after function getIndent
util/ui/ui.go +422 method UI.displayWrappingTableWithWidth defined after function getIndent
util/ui/ui.go +479 method UI.modifyColor defined after function getIndent
exit status 1
make: *** [custom-lint] Error 1

@a-b
Copy link
Member

a-b commented Jan 24, 2022

Thanks for the context. I was able to reproduce it with go version go1.17.6 linux/amd64. We are working on a new Github Actions-based pipeline and we are expecting better linting very soon.

@a-b
Copy link
Member

a-b commented Jan 24, 2022

Also, we are very open to PR's if you are interested in contributing.

@metskem
Copy link
Contributor Author

metskem commented Jan 24, 2022

#2246

@moleske
Copy link
Member

moleske commented Jan 13, 2024

lint errors were fixed, closing

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

No branches or pull requests

4 participants