Linting items for review #98
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#98
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As we are closing in on code freeze for 2.0.0, I'm seeing some issues from
golangci-lint run
(just the default linters enabled):You can run the entire suite of linters using
golangci-lint --enable-all
, which returns a very long list. A couple of items I saw that might be of interest:golangci-lint run --disable-all --enable gosec
golangci-lint run --disable-all --enable godox
What are your thoughts on addressing these, especially in relation to 2.0.0?
Is this different than running
:goMetaLinter
in vim? I have not done so in a quick bit. :-/Looking at the snapshot you provided:
!strings.Contains( ... )
means that if something returns 0 to do what is in the block... but what I want is if something is less than zero. The bang does not work that way.getCurrentPageRawData
) can probably get removed.getCurrentPageUrl
) can probably get removed.Given that a number of those seem questionable, or at least dont seem to apply to the code as written, I think I am fine with sticking with vim-go's
:GoMetaLinter
command as the standard for linting. I did just double check that and found a few things leftoever that we had previously discussed and decided to leave.I'm open to being convinced to go another way, but at this point I feel pretty happy with the codebase.
vim-go uses golangci-lint but has a specific set of linters enabled when it is run. These results are from the default set of linters used by golangci-lint when run from the command line.
I'm glad these turned out to be mostly invalid. I'm happy to stick with vim-go's
:GoMetaLinter
, this was something I found when investigating the change from GoMetaLinter to golangci-lint and thought they may be important.Using
:GoCallers
ongetCurrentPageRawData() and
getCurrentPageUrl()` which did not return any results. Searching the text also shows they do not seem to be called. So perhaps they can be removed.Cool. Thank you for clearing up what was being used and how it was being called. I think I am happy to stick with the vim configuration of glangci-lint, at least for now. As to the two methods that are unused, lets ditch them (unless there is a useful place to use them... I'm sure they were written for a reason, but that reason likely shifted away from them over time). I think deleting them should be fine. I'll make a PR later today unless I see you have made one before I get to it.
PR #100 is open for this change, no further action is required.