-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix logger refactoring regression: manager logging add #24847
Conversation
IIRC, there is a lint rule for such missed second arguments on type casts, we should probably use it. |
I do not think we need a lint for this case. Eg: here is a real use case: for a field But if it's written as: If it's written as So, |
Runtime panics are bad because the condition for the panic may not be hit during testing.
I think forcing this style would be okay. Go is (overly) explicit with it's error handling, just not in this case apparently, but it could be enforced with the linter rule. |
For reference, this is the lint option I'm talking about: linters-settings:
errcheck:
# Report about not checking of errors in type assertions: `a := b.(MyStruct)`.
# Such cases aren't reported by default.
# Default: false
check-type-assertions: true |
Maybe another PR. |
* upstream/main: Fix `@font-face` overrides (go-gitea#24855) Fix logger refactoring regression: manager logging add (go-gitea#24847) Remove publish docs CI workflow (go-gitea#24889) Fix double border and adjust width for user profile page (go-gitea#24870) Support changing git config through `app.ini`, use `diff.algorithm=histogram` by default (go-gitea#24860) Fix flakey test in logger test (go-gitea#24883) Run stylelint on .vue files (go-gitea#24865) Update `CONTRIBUTING.md` (go-gitea#24492) Do not call nil handler for a dummy queue (go-gitea#24880) Remove unnecessary usage prefix from doc titles (go-gitea#24869) Add API for Label templates (go-gitea#24602) # Conflicts: # .stylelintrc.yaml # web_src/css/font_i18n.css
The
rotate
option is optional.Test result: