[PR #11] [MERGED] golint fixed #22

Closed
opened 2026-02-16 10:23:52 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/git/pull/11
Author: @lunny
Created: 11/12/2016
Status: Merged
Merged: 11/16/2016
Merged by: @lunny

Base: masterHead: lunny/fixed_lint


📝 Commits (3)

  • 167a0ba golint fixed current -min_confidence=0.9
  • 53e6ad6 add comment on HookPathUpdate
  • 38a5ca6 change returned unexported types to exported types

📊 Changes

22 files changed (+183 additions, -114 deletions)

View changed files

📝 blob.go (+1 -0)
📝 command.go (+2 -4)
📝 commit.go (+18 -7)
📝 commit_archive.go (+4 -0)
📝 error.go (+6 -0)
📝 git.go (+5 -5)
📝 hook.go (+3 -0)
📝 repo.go (+8 -5)
📝 repo_branch.go (+9 -7)
📝 repo_commit.go (+23 -16)
📝 repo_hook.go (+2 -0)
📝 repo_object.go (+9 -4)
📝 repo_pull.go (+1 -1)
📝 repo_tag.go (+9 -6)
📝 repo_tree.go (+2 -2)
📝 sha1.go (+20 -19)
📝 submodule.go (+3 -2)
📝 tag.go (+3 -2)
📝 tree.go (+15 -13)
📝 tree_blob.go (+4 -2)

...and 2 more files

📄 Description

This PR will fix the golint errors. But we need set the golint minimal confidence to 0.9 although the default confidence is 0.8, because there are some errors could not be resolved currently. If you have any idea, please send a new PR to fix it.

commit.go:42:35: exported method ParentID returns unexported type git.sha1, which can be annoying to use
commit.go:211:35: exported method GetSubModules returns unexported type *git.objectCache, which can be annoying to use
sha1.go:59:23: exported func MustID returns unexported type git.sha1, which can be annoying to use
sha1.go:68:23: exported func NewID returns unexported type git.sha1, which can be annoying to use
sha1.go:76:33: exported func MustIDFromString returns unexported type git.sha1, which can be annoying to use
sha1.go:82:33: exported func NewIDFromString returns unexported type git.sha1, which can be annoying to use

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/git/pull/11 **Author:** [@lunny](https://github.com/lunny) **Created:** 11/12/2016 **Status:** ✅ Merged **Merged:** 11/16/2016 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `lunny/fixed_lint` --- ### 📝 Commits (3) - [`167a0ba`](https://github.com/go-gitea/git/commit/167a0ba929d6f71d9b8fa954ec5cef3e2ac3a2b0) golint fixed current -min_confidence=0.9 - [`53e6ad6`](https://github.com/go-gitea/git/commit/53e6ad6ffc4d8b00e3aad722993995c04c9598e8) add comment on HookPathUpdate - [`38a5ca6`](https://github.com/go-gitea/git/commit/38a5ca6b26a3586079f114e295bfe23ad444ccec) change returned unexported types to exported types ### 📊 Changes **22 files changed** (+183 additions, -114 deletions) <details> <summary>View changed files</summary> 📝 `blob.go` (+1 -0) 📝 `command.go` (+2 -4) 📝 `commit.go` (+18 -7) 📝 `commit_archive.go` (+4 -0) 📝 `error.go` (+6 -0) 📝 `git.go` (+5 -5) 📝 `hook.go` (+3 -0) 📝 `repo.go` (+8 -5) 📝 `repo_branch.go` (+9 -7) 📝 `repo_commit.go` (+23 -16) 📝 `repo_hook.go` (+2 -0) 📝 `repo_object.go` (+9 -4) 📝 `repo_pull.go` (+1 -1) 📝 `repo_tag.go` (+9 -6) 📝 `repo_tree.go` (+2 -2) 📝 `sha1.go` (+20 -19) 📝 `submodule.go` (+3 -2) 📝 `tag.go` (+3 -2) 📝 `tree.go` (+15 -13) 📝 `tree_blob.go` (+4 -2) _...and 2 more files_ </details> ### 📄 Description This PR will fix the golint errors. But we need set the golint minimal confidence to 0.9 although the default confidence is 0.8, because there are some errors could not be resolved currently. If you have any idea, please send a new PR to fix it. ``` commit.go:42:35: exported method ParentID returns unexported type git.sha1, which can be annoying to use commit.go:211:35: exported method GetSubModules returns unexported type *git.objectCache, which can be annoying to use sha1.go:59:23: exported func MustID returns unexported type git.sha1, which can be annoying to use sha1.go:68:23: exported func NewID returns unexported type git.sha1, which can be annoying to use sha1.go:76:33: exported func MustIDFromString returns unexported type git.sha1, which can be annoying to use sha1.go:82:33: exported func NewIDFromString returns unexported type git.sha1, which can be annoying to use ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 10:23:52 -05:00
yindo closed this issue 2026-02-16 10:23:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: go-gitea/git#22