Skip to content

GitHub Action CI: Add Go source file format check#6090

Merged
RPRX merged 11 commits into
XTLS:mainfrom
KobeArthurScofield:gofmt-dryrun
May 29, 2026
Merged

GitHub Action CI: Add Go source file format check#6090
RPRX merged 11 commits into
XTLS:mainfrom
KobeArthurScofield:gofmt-dryrun

Conversation

@KobeArthurScofield

Copy link
Copy Markdown
Contributor

#6057 (comment)

全局检查一遍,有问题直接列出文件路径以及具体更改并且错误码触发 Actions 错误,不写回仓库

@Fangliding

Copy link
Copy Markdown
Member

1 还得先全core format一遍 不然自己炸自己
2 道义上应该用 go run ./infra/vformat/main.go (需要下载gofumpt)

@KobeArthurScofield

Copy link
Copy Markdown
Contributor Author

还得先全core format一遍 不然自己炸自己

暂时来说为了测试效果有意为之,后面再看什么时机 format 一次(现在格式化问题确实一堆)

道义上应该用 go run ./infra/vformat/main.go (需要下载gofumpt)

安排上了,不过 main/commands/all/tls/ech.go 似乎有点格式化问题,会无尽提示有问题

@KobeArthurScofield

Copy link
Copy Markdown
Contributor Author

给 vformat 增加了格式检查功能(默认还是格式化并写出),暂时禁用 gci 避免在部分文件出现的格式化打架问题

gofumpt 有点小问题,但是不影响整体用到的功能(格式化和检查都没什么大问题),也没想到有什么解决方法。

没什么要改的话就这样吧

@KobeArthurScofield

Copy link
Copy Markdown
Contributor Author

#6149 (comment)

@RPRX

RPRX commented May 29, 2026

Copy link
Copy Markdown
Member

@KobeArthurScofield rebase main 然后修一下 fmt,这个 PR 还是得尽早合入主线,合了后我让其它 PR rebase 一下

@RPRX

RPRX commented May 29, 2026

Copy link
Copy Markdown
Member

@KobeArthurScofield fmt 一下需要这么久吗

@KobeArthurScofield

Copy link
Copy Markdown
Contributor Author

好了 中间临时有事被插播了

@KobeArthurScofield

Copy link
Copy Markdown
Contributor Author

OK good to go
没想到 test 里面居然有土豆地雷

@RPRX RPRX merged commit d43a808 into XTLS:main May 29, 2026
39 of 40 checks passed
@KobeArthurScofield KobeArthurScofield deleted the gofmt-dryrun branch May 29, 2026 15:55
nebulabox added a commit to nebulabox/Xray-core that referenced this pull request Jun 2, 2026
* commit '94ffd50060f1cfd5d7482ec90a23a92bdefdff68': (107 commits)
  Xray-core v26.6.1
  Burst observatory: Fix init check (XTLS#6221)
  DNS outbound: Replace "reject" with "return" (`rCode` is 0 by default) (XTLS#6214)
  uTLS: Update `ModernFingerprints` map and `OtherFingerprints` map (XTLS#6181)
  Realm finalmask: Fix client punch peers (XTLS#6213)
  GitHub Action CI: Add Go source file format check (XTLS#6090)
  Burst observatory: Fix time compare, cancel pending ping on instance close or new schedule started (XTLS#6106)
  Finalmask: Add mkcp-legacy (UDP) to replace mkcp-* and legacy header-* (XTLS#6201)
  Sudoku finalmask: Harden UDP ReadFrom() against invalid packets (XTLS#6185)
  XICMP finalmask: Refactor & Speed up; Add multi `ips` and `dgram` mode (client) (XTLS#6168)
  Salamander finalmask: Support `packetSize` (Gecko in Hysteria v2.9.2) (XTLS#6198)
  Finalmask: Add Realm (UDP hole punching in Hysteria v2.9.1) (XTLS#6137)
  README.md: Add flutter_vless to Xray Wrapper in Others (XTLS#6197)
  DNS: Avoid panic on domain too long (XTLS#6207)
  header-custom finalmask: Remove headerConnMode headerReadAddrAware interface (XTLS#6193)
  noise finalmask: Better `reset` (XTLS#6188)
  DNS: Avoid passing domain to WriteTo func (XTLS#6163)
  Bump golang.org/x/net from 0.54.0 to 0.55.0 (XTLS#6192)
  Socks5 server: More standard UDP ASSOCIATE (RFC 1928) (XTLS#6149)
  Hysteria server: `tls.WithNextProto("h3")` by default (XTLS#6186)
  ...

# Conflicts:
#	core/core.go
@Meo597

Meo597 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

@KobeArthurScofield

Copy link
Copy Markdown
Contributor Author

定时任务延迟几个小时才运行都算好的

也不知道最近大半年 GitHub 到底在干嘛这边炸完那边炸

@Fangliding

Copy link
Copy Markdown
Member

因为AI的缘故github的活跃仓库数量涨了几倍有余 而AI又很擅长编写大量CI加上它们commit又多加之action的免费额度给的很慷概导致runner不太稳定 甚至组服务器用的RAM也一直在涨
哎都是坏消息

@Meo597

Meo597 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

感觉 gh 快撑不住了早晚要缩水免费额度
现在定时任务要延迟 4 个小时

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.

4 participants