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

[skip-changelog] Use golangci-lint #2338

Merged
merged 14 commits into from
Sep 27, 2023
Merged

[skip-changelog] Use golangci-lint #2338

merged 14 commits into from
Sep 27, 2023

Conversation

alessio-perugini
Copy link
Contributor

@alessio-perugini alessio-perugini commented Sep 25, 2023

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Use golangci-lint instead of the deprecated golint

What is the current behavior?

We're using the deprecated golint to lint files

What is the new behavior?

Use the new golangci-lint

Does this PR introduce a breaking change, and is titled accordingly?

Other information

I've picked the most valuable linters.
The following has been disabled as some of them contain many opinionated rules and are not to be considered a drop-in replacement of golint.

  • depguard
  • errcheck
  • gocritic
  • thelper

If this PR is accepted we have to update also the PR that contains all our workflows

@alessio-perugini alessio-perugini self-assigned this Sep 25, 2023
@alessio-perugini alessio-perugini added topic: code Related to content of the project itself topic: infrastructure Related to project infrastructure labels Sep 25, 2023
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Patch coverage: 89.65% and project coverage change: +0.14% 🎉

Comparison is base (5a4f48b) 63.06% compared to head (230c2df) 63.20%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2338      +/-   ##
==========================================
+ Coverage   63.06%   63.20%   +0.14%     
==========================================
  Files         201      201              
  Lines       19259    19285      +26     
==========================================
+ Hits        12146    12190      +44     
+ Misses       6059     6038      -21     
- Partials     1054     1057       +3     
Flag Coverage Δ
unit 63.20% <89.65%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
arduino/builder/internal/utils/utils.go 74.63% <ø> (ø)
arduino/builder/sketch.go 63.24% <ø> (ø)
arduino/cores/packagemanager/package_manager.go 75.47% <ø> (+0.57%) ⬆️
arduino/errors.go 26.85% <ø> (ø)
arduino/libraries/libraries.go 94.33% <ø> (ø)
commands/daemon/stream.go 66.66% <0.00%> (ø)
commands/debug/debug.go 41.02% <0.00%> (+0.34%) ⬆️
executils/process.go 82.89% <ø> (ø)
internal/cli/feedback/feedback.go 69.78% <ø> (ø)
internal/cli/updater/updater.go 15.15% <0.00%> (ø)
... and 6 more

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alessio-perugini alessio-perugini changed the title [skip-changelog] Use golangci lint [skip-changelog] Use golangci-lint Sep 25, 2023
@alessio-perugini alessio-perugini marked this pull request as ready for review September 25, 2023 14:37
Copy link
Contributor

@umbynos umbynos left a comment

Choose a reason for hiding this comment

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

I see a lot of value in this tool.

Copy link
Member

@cmaglie cmaglie left a comment

Choose a reason for hiding this comment

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

@alessio-perugini
Copy link
Contributor Author

Shall we update the template repo too?

https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml

Yep, arduino/tooling-project-assets#400

@alessio-perugini alessio-perugini merged commit 6aa1be0 into master Sep 27, 2023
192 checks passed
@alessio-perugini alessio-perugini deleted the use-golangci-lint branch September 27, 2023 15:07
@per1234 per1234 added the type: enhancement Proposed improvement label Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants