chore(lint): Add exceptions for dbfs_model and unittest (#10275)

Thanks a lot to @floss4good who pointed this out in the comments of
#10253!

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10275
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: floss4good <floss4good@noreply.codeberg.org>
Co-authored-by: nachtjasmin <nachtjasmin@posteo.de>
Co-committed-by: nachtjasmin <nachtjasmin@posteo.de>
This commit is contained in:
nachtjasmin
2025-12-09 14:34:06 +01:00
committed by Gusted
parent f43d48d5c8
commit 70166de15a
11 changed files with 38 additions and 54 deletions
+1 -17
View File
@@ -50,36 +50,20 @@ linters:
importas:
alias:
# Specific overrides that would violate the default rules further below.
- pkg: forgejo.org/models/actions
alias: actions_model
- pkg: forgejo.org/models/activities
alias: activities_model
- pkg: forgejo.org/models/db
alias: ""
- pkg: forgejo.org/models/issues
alias: issues_model
- pkg: forgejo.org/models/organization
alias: org_model
- pkg: forgejo.org/models/packages
alias: packages_model
- pkg: forgejo.org/services/actions
alias: actions_service
- pkg: forgejo.org/services/context
alias: app_context
- pkg: forgejo.org/services/doctor
alias: doctor
- pkg: forgejo.org/services/packages
alias: packages_service
- pkg: forgejo.org/services/repository
alias: repo_service
# Make sure that we follow a consistent naming for model and service aliases.
# The \w+? syntax is the RE2 syntax for: one or more \w, prefer fewer
#
# It's used to make sure that if the model has a plural name, e.g. "issues", it's imported with the singular
# name (e.g. "issue") nonetheless.
- pkg: 'forgejo.org/(model|service)s/(\w+?)s?'
- pkg: 'forgejo.org/(model|service)s/(\w+)'
alias: '${2}_${1}'
revive: