mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-17 23:44:39 +01:00
Enable nilnil linter for new code (#36591)
Fixes: https://github.com/go-gitea/gitea/issues/36152 Enable the `nilnil` linter while adding `//nolint` comments to existing violations. This will ensure no new issues enter the code base while we can fix existing issues gradually. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -174,13 +174,13 @@ func GetOrgAssignees(ctx context.Context, orgID int64) (_ []*user_model.User, er
|
||||
|
||||
func loadOrganizationOwners(ctx context.Context, users user_model.UserList, orgID int64) (map[int64]*TeamUser, error) {
|
||||
if len(users) == 0 {
|
||||
return nil, nil
|
||||
return nil, nil //nolint:nilnil // return nil when there are no users
|
||||
}
|
||||
ownerTeam, err := GetOwnerTeam(ctx, orgID)
|
||||
if err != nil {
|
||||
if IsErrTeamNotExist(err) {
|
||||
log.Error("Organization does not have owner team: %d", orgID)
|
||||
return nil, nil
|
||||
return nil, nil //nolint:nilnil // return nil when owner team does not exist
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user