[Feature]: Enforce formatting checks in CI for Go, Lua, shell and PowerShell

オープン
#766 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
50/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, lua, powershell, shell

調査の方向性

Start by running gofmt -l . on main to confirm internal/plugin/model_test.go is flagged, then format it. The config files are AGENTS.md and CONTRIBUTING.md (line 37), and .gitattributes covers the *.sh, *.ps1 and *.go files. Add the CI check for each language, plus stylua.toml and .editorconfig. Done when the new CI steps pass on the current tree and the Lua, shell and PowerShell files conform to the checks you add. The PowerShell tool choice is open, so confirm it with a maintainer before you start.

索引モデルが issue の本文から書いたものです。

説明

enhancement
1. Your usage scenarios?

Nothing enforces formatting, so files drift. Checked on main at c4f6275:

  • gofmt -l reports internal/plugin/model_test.go (struct literal alignment). internal/env/context_test.go was also unformatted at 37cff8f; a later commit changed it, but nothing in CI keeps files formatted.
  • No CI step runs gofmt or any other formatter. AGENTS.md asks contributors to run gofmt -w on changed Go files, and CONTRIBUTING.md (line 37) only says "You can try running go fmt and go vet".
  • There is no .editorconfig (indentation, final newline, trailing whitespace) and no stylua.toml, although 19 Lua files are tracked.
  • .gitattributes pins LF line endings for *.sh, *.ps1 and *.go. That protects line endings, not formatting.

The reference is version-fox/vfox-java. Its lint.yml runs gofmt -l and stylua --check ., and its stylua.toml sets indent_type = "Spaces", indent_width = 4, column_width = 120 and line_endings = "Unix".

2. What is your expected outcome?

A formatting check in CI for each language, with its configuration checked in:

  • Go: test -z "$(gofmt -l .)", after formatting internal/plugin/model_test.go.
  • Lua: stylua --check with a stylua.toml, applied to the existing Lua files.
  • Shell: shfmt -d for install.sh and scripts/*.sh.
  • PowerShell: a format check for the .ps1 files, for example PSScriptAnalyzer's formatting rules.
  • All text files: an .editorconfig, checked by a tool such as editorconfig-checker.

Linting is out of scope for this issue.

主要言語
Go
スター
4k
フォーク
177
平均マージ
1日 20時間
マージ済み PR(30日)
31

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

version-fox/vfox のほかの issue

version-fox/vfox の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。