mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2026-10-13 21:34:25 +00:00
[PR #203] test: skip directories ignored by the go command in TestFormatting #202
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-go#202
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/amnezia-vpn/amneziawg-go/pull/203
Author: @earmark-halt
Created: 10/9/2026
Status: 🔄 Open
Base:
master← Head:fix/format-test-skip-ignored-dirs📝 Commits (1)
75f029dtest: skip directories ignored by the go command in TestFormatting📊 Changes
1 file changed (+11 additions, -1 deletions)
View changed files
📝
format_test.go(+11 -1)📄 Description
Fixes #195.
Problem
TestFormattingwalks the whole source tree and gofmt-checks every.gofile in it, including directories the go command ignores: names starting with.or_, andtestdata(seego help packages). Packaging tools putGOPATHinside the source tree under such a name. Void'sxbps-srcuses_build-<pkgname>-xbps. Once the module cache there is populated, the test checks third-party code and fails:Fix
Skip those directories in the walk, as the go command does. The module's own code is checked exactly as before.
Testing
golang:1.27container withGOPATH=$PWD/_build-amneziawg-go-xbpsaftergo mod download: 124 "unformatted code" reports, all from the module cache (gVisor, Outline SDK, x/tools, ...), andTestFormattingfails. With the fix it passes, and so doesgo test ./...with the in-treeGOPATH.device/is still reported..gopath/andtestdata/are skipped, like_build-*/.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.