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

Abierto
#766 2 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
50/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go, lua, powershell, shell

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Go
Estrellas
4k
Forks
177
Merge medio
1 d 20 h
PR fusionados (30 d)
31

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de version-fox/vfox

Todos los issues de version-fox/vfox

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.