[Feature]: Enforce Apache-2.0 license headers on all source files

Abierto
#767 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
github-actions, go, lua, powershell, shell
Área
ci-cd, tooling

Línea de trabajo

Start from the existing header in main.go and cmd/cmd.go, and the rule in AGENTS.md, to settle the exact header text. Then look at .github/workflows/ to pick where a license check job goes, and compare the reference config in version-fox/vfox-java (.licenserc.yaml). Done when CI fails on a missing header, the 71 listed files carry it, and exemptions are listed in the config. The PowerShell part is blocked on #722, so leave it out.

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

Descripción

enhancement help wanted
1. Your usage scenarios?

Most source files carry the Apache-2.0 header (for example main.go, cmd/cmd.go and internal/manager.go), and AGENTS.md asks new Go files to keep the header style. Nothing checks it. Checked on main at c4f6275, 71 tracked files of the types below have no header:

Type Missing Examples
Go 22 of 245 cmd/commands/base.go, cmd/commands/config.go, internal/shell/nushell.go, internal/shared/util/ci.go
PowerShell 2 of 5 completions/powershell_autocomplete.ps1, scripts/e2e-test.ps1
Shell 3 of 3 install.sh, scripts/bump.sh, scripts/e2e-test.sh
Lua 19 of 19 internal/shell/clink_vfox.lua, examples/plugins/sample/main.lua
YAML and TOML 15 of 15 all of .github/workflows/, .goreleaser.yaml, .vfox.toml
Other 10 completions/bash_autocomplete, completions/zsh_autocomplete, completions/vfox.fish, inno_setup/*.iss, docs/.vitepress/theme/*.vue, packaging/msix/AppxManifest.xml

The three PowerShell scripts that do have a header are packaging/msix/make-msix.ps1, packaging/msix/gen-assets.ps1 and scripts/e2e-msix-test.ps1.

The PowerShell part is blocked on an apache/skywalking-eyes release that supports .ps1 files, tracked in #722. This issue covers the rest of the repository.

The reference is version-fox/vfox-java. Its .licenserc.yaml (skywalking-eyes) covers Go, Lua, YAML and TOML, and its license.yml checks PowerShell files with addlicense and .license.tpl.

2. What is your expected outcome?
  • A license-header check in CI, for example skywalking-eyes with a checked-in .licenserc.yaml, covering Go, shell, Lua, YAML, TOML, Vue, Inno Setup and XML.
  • A PowerShell check for .ps1 files until #722 lands, for example addlicense with a .license.tpl.
  • The header added to every in-scope file that lacks it.
  • Exemptions listed explicitly in the config, for example generated completion scripts and test fixtures.
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.