Skip to content

Enable unconvert and revive linters#6386

Draft
toaster wants to merge 23 commits into
fyne-io:developfrom
toaster:lint/revive-add-constant
Draft

Enable unconvert and revive linters#6386
toaster wants to merge 23 commits into
fyne-io:developfrom
toaster:lint/revive-add-constant

Conversation

@toaster

@toaster toaster commented Jun 29, 2026

Copy link
Copy Markdown
Member

Description:

This PR enables the unconvert and revive linters via golangci-lint.
The former checks for unnecessary type conversions while the latter is a multi-purpose linter by its own.
The most complaining rules for revive are disabled for now. This PR only addresses the complaints of the add-constant rule.
The other rules will be addressed in follow-up PRs.

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

toaster added 23 commits June 29, 2026 08:49
This removes some unnecessary type conversions.
All modules causing warnings are disabled for now.
The next commits will address all the TODOs.
For the built-in sizes, I deactivated the linter instead.
It does not make much sense to add constants in this particular case.

The color parsing was simplified.
…stants

piggy-backed:
- some revive-ignore comments
- streamlining name of shader variable `cornerRadius` to `corner_radius`
… or disabling the check

piggy-backed: Remove weekday#String() which was only used for switch statements.
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 59.868% (-0.03%) from 59.894% — toaster:lint/revive-add-constant into fyne-io:develop

@toaster toaster marked this pull request as draft June 29, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants