mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	enforce nolint scope (#34851)
enable nolintlint scope requirement add comments to new directives so it's more obvious why they are in place --- I can also toggle the mandatory comments on if that's something of interest. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		| @@ -409,13 +409,13 @@ func IsUserRepoAdmin(ctx context.Context, repo *repo_model.Repository, user *use | ||||
|  | ||||
| // AccessLevel returns the Access a user has to a repository. Will return NoneAccess if the | ||||
| // user does not have access. | ||||
| func AccessLevel(ctx context.Context, user *user_model.User, repo *repo_model.Repository) (perm_model.AccessMode, error) { //nolint | ||||
| func AccessLevel(ctx context.Context, user *user_model.User, repo *repo_model.Repository) (perm_model.AccessMode, error) { //nolint:revive // export stutter | ||||
| 	return AccessLevelUnit(ctx, user, repo, unit.TypeCode) | ||||
| } | ||||
|  | ||||
| // AccessLevelUnit returns the Access a user has to a repository's. Will return NoneAccess if the | ||||
| // user does not have access. | ||||
| func AccessLevelUnit(ctx context.Context, user *user_model.User, repo *repo_model.Repository, unitType unit.Type) (perm_model.AccessMode, error) { //nolint | ||||
| func AccessLevelUnit(ctx context.Context, user *user_model.User, repo *repo_model.Repository, unitType unit.Type) (perm_model.AccessMode, error) { //nolint:revive // export stutter | ||||
| 	perm, err := GetUserRepoPermission(ctx, repo, user) | ||||
| 	if err != nil { | ||||
| 		return perm_model.AccessModeNone, err | ||||
|   | ||||
		Reference in New Issue
	
	Block a user