Code Formats, Nits & Unused Func/Var deletions#15286
Merged
6543 merged 8 commits intogo-gitea:masterfrom Apr 9, 2021
Merged
Conversation
Member
6543
commented
Apr 5, 2021
- _ to unused func options
- rm useless brakets
- rm trifial non used models functions
- rm dead code
- rm dead global vars
- fix routers/api/v1/repo/issue.go
- dont overload import module
lunny
reviewed
Apr 5, 2021
| if m == nil { | ||
| return nil | ||
| } | ||
|
|
Member
Author
There was a problem hiding this comment.
because of dead code
see L100 & L110
If we like to keep it, we need a reason we should write down here ...
Member
|
Maybe some of these can be enforced by the linter. |
silverwind
reviewed
Apr 5, 2021
lafriks
approved these changes
Apr 7, 2021
lunny
reviewed
Apr 7, 2021
| // Only fetch the issues if we either don't have a keyword or the search returned issues | ||
| // This would otherwise return all issues if no issues were found by the search. | ||
| if len(keyword) == 0 || len(issueIDs) > 0 || len(labelIDs) > 0 { | ||
| if len(keyword) == 0 || len(issueIDs) > 0 || len(includedLabelNames) > 0 { |
Member
There was a problem hiding this comment.
This maybe a bug but not a refactor?
Member
Author
There was a problem hiding this comment.
didn't dig into it yet - posible
Member
Author
There was a problem hiding this comment.
look's like in an edge case the label filter potentially is not applied, but I could not hit it, so It's a code improvement to prevent becoming a bug in the future
silverwind
approved these changes
Apr 9, 2021
Member
Author
|
🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.