You've already forked agentic-coding-workflow
style(project): silence remaining lint findings (stutter, max shadow, gosec)
This commit is contained in:
@@ -120,13 +120,13 @@ func (r *fakeRepo) UnarchiveProject(_ context.Context, id uuid.UUID) error {
|
||||
// ===== Requirement =====
|
||||
|
||||
func (r *fakeRepo) nextRequirementNumber(projectID uuid.UUID) int {
|
||||
max := 0
|
||||
maxNum := 0
|
||||
for _, x := range r.requirements {
|
||||
if x.ProjectID == projectID && x.Number > max {
|
||||
max = x.Number
|
||||
if x.ProjectID == projectID && x.Number > maxNum {
|
||||
maxNum = x.Number
|
||||
}
|
||||
}
|
||||
return max + 1
|
||||
return maxNum + 1
|
||||
}
|
||||
|
||||
func (r *fakeRepo) CreateRequirement(_ context.Context, in *Requirement) (*Requirement, error) {
|
||||
@@ -235,13 +235,13 @@ func (r *fakeRepo) ReopenRequirement(_ context.Context, id uuid.UUID) error {
|
||||
// ===== Issue =====
|
||||
|
||||
func (r *fakeRepo) nextIssueNumber(projectID uuid.UUID) int {
|
||||
max := 0
|
||||
maxNum := 0
|
||||
for _, x := range r.issues {
|
||||
if x.ProjectID == projectID && x.Number > max {
|
||||
max = x.Number
|
||||
if x.ProjectID == projectID && x.Number > maxNum {
|
||||
maxNum = x.Number
|
||||
}
|
||||
}
|
||||
return max + 1
|
||||
return maxNum + 1
|
||||
}
|
||||
|
||||
func (r *fakeRepo) CreateIssue(_ context.Context, in *Issue) (*Issue, error) {
|
||||
@@ -280,15 +280,12 @@ func (r *fakeRepo) ListIssues(_ context.Context, projectID uuid.UUID, filter Iss
|
||||
continue
|
||||
}
|
||||
if filter.Requirement != nil {
|
||||
switch {
|
||||
case *filter.Requirement == 0:
|
||||
if *filter.Requirement == 0 {
|
||||
if x.RequirementID != nil {
|
||||
continue
|
||||
}
|
||||
default:
|
||||
if x.RequirementID == nil || *x.RequirementID != *requirementID {
|
||||
continue
|
||||
}
|
||||
} else if x.RequirementID == nil || *x.RequirementID != *requirementID {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if filter.AssigneeID != nil {
|
||||
|
||||
Reference in New Issue
Block a user