Skip to content
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 a lot of recommendations from staticcheck #1125

Merged
merged 4 commits into from Jun 25, 2020
Merged

Fix a lot of recommendations from staticcheck #1125

merged 4 commits into from Jun 25, 2020

Conversation

Jacalz
Copy link
Member

@Jacalz Jacalz commented Jun 22, 2020

Description:

Running staticcheck -f stylish ./... on the codebase got a lot of result of small changes to improve the code. Some where ignored due to being part of the gomobile code, but most of the strictly fyne related fixes are fixed.

Testing:

There is more testing that needs to be done on Windows and MacOS and some parts where I would like some feedback before touching it. I would have created a draft PR, but I remember seeing issues with Travis on those so I will keep it as a regular PR for now.

Please check that I haven't removed something that I shouldn't have removed.

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.
    • All that didn't already fail on develop for me seem to work.

- Removed some more unused functions.
- Partly reverted progressbarinfinite chenges (might have caused a small issue)
theme/theme.go Outdated Show resolved Hide resolved
Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Largely looks good, a couple of comments inline

theme/theme.go Outdated Show resolved Hide resolved
cmd/fyne_settings/data/gen.go Outdated Show resolved Hide resolved
…ll fix

This fixes the strings.Replace function to use n == -1 instead of 0 which gives no results at all.
Added back the language icon and do a small fix to use the correct package in the bundled code.
@Jacalz Jacalz changed the title WIP - Fix a lot of recommendations from staticcheck Fix a lot of recommendations from staticcheck Jun 23, 2020
@Jacalz
Copy link
Member Author

Jacalz commented Jun 23, 2020

The changes have been made and testing on Linux and macOS gives no indication of any regressions :)

@andydotxyz
Copy link
Member

Great thanks - apologies for the delay. Just tapped update as well so as soon as it's green you can merge

@Jacalz Jacalz merged commit 3d6571a into fyne-io:develop Jun 25, 2020
@Jacalz Jacalz deleted the staticcheck-fixes branch June 25, 2020 14:58
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.

None yet

2 participants