Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fmt: introduce golangci-lint and go vet use CI with action and using build tag#804

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
gen2thomas wants to merge1 commit intotinygo-org:dev
base:dev
Choose a base branch
Loading
fromgen2thomas:feature/linter_add_build_tags

Conversation

@gen2thomas
Copy link

@gen2thomasgen2thomas commentedOct 22, 2025
edited
Loading

see#802 for a general description and the version without Github action
see#803 for version with multiple runners

This PR is an alternative way to earn all features of the golangci-lintGitHub Action.

This is achieved by adding a build tag to every file that cannot be linted due to a failed compilation. This is caused by dependencies to the "machine" package of tiny-go or other such dependencies (e.g. device/arm).

Although the condition is to add a build tag in many files, it has many advantages over the other versions:

  • generic approach for running "go vet" and "golangci-lint" without any boilerplate code, locally (Makefile) and in CI
  • incredible fast (takes 30 sec. only, compared to 7min for version with multiple runners)
  • all features are fully supported (e.g. inline annotations)
  • disable the linter by just adding a build tag in the file is possible in the future
  • the same can be configured in each IDE (by adding to the local linter configuration)
  • locally, if the IDE shows all linter issues, the developer can see it, although the package is disabled by build flag

@gen2thomasgen2thomasforce-pushed thefeature/linter_add_build_tags branch from8ea00db tobfc0179CompareOctober 22, 2025 14:57
@gen2thomasgen2thomas changed the titlefmt: introduce golangci-lint and go vet using build tagfmt: introduce golangci-lint and go vet use CI with action and using build tagOct 22, 2025
@gen2thomasgen2thomasforce-pushed thefeature/linter_add_build_tags branch 2 times, most recently from703ad49 to43a4b70CompareOctober 22, 2025 15:29
@gen2thomasgen2thomasforce-pushed thefeature/linter_add_build_tags branch from43a4b70 to1e2eabeCompareOctober 22, 2025 15:40
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@gen2thomas

[8]ページ先頭

©2009-2025 Movatter.jp