mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-07-02 10:46:47 +08:00
enable staticcheck QFxxxx rules (#34064)
This commit is contained in:
@ -425,32 +425,33 @@ func (repo *Repository) MustGetUnit(ctx context.Context, tp unit.Type) *RepoUnit
|
||||
return ru
|
||||
}
|
||||
|
||||
if tp == unit.TypeExternalWiki {
|
||||
switch tp {
|
||||
case unit.TypeExternalWiki:
|
||||
return &RepoUnit{
|
||||
Type: tp,
|
||||
Config: new(ExternalWikiConfig),
|
||||
}
|
||||
} else if tp == unit.TypeExternalTracker {
|
||||
case unit.TypeExternalTracker:
|
||||
return &RepoUnit{
|
||||
Type: tp,
|
||||
Config: new(ExternalTrackerConfig),
|
||||
}
|
||||
} else if tp == unit.TypePullRequests {
|
||||
case unit.TypePullRequests:
|
||||
return &RepoUnit{
|
||||
Type: tp,
|
||||
Config: new(PullRequestsConfig),
|
||||
}
|
||||
} else if tp == unit.TypeIssues {
|
||||
case unit.TypeIssues:
|
||||
return &RepoUnit{
|
||||
Type: tp,
|
||||
Config: new(IssuesConfig),
|
||||
}
|
||||
} else if tp == unit.TypeActions {
|
||||
case unit.TypeActions:
|
||||
return &RepoUnit{
|
||||
Type: tp,
|
||||
Config: new(ActionsConfig),
|
||||
}
|
||||
} else if tp == unit.TypeProjects {
|
||||
case unit.TypeProjects:
|
||||
cfg := new(ProjectsConfig)
|
||||
cfg.ProjectsMode = ProjectsModeNone
|
||||
return &RepoUnit{
|
||||
|
Reference in New Issue
Block a user