Establish & enforce style rules

Abierto
#250 18 comentarios 9 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
github-actions, lua
Área
ci-cd, tooling

Línea de trabajo

Start by reviewing the proposed .editorconfig in PR #247 and the repository’s .gitattributes, then resolve the line-ending policy described in the issue. The payload also points to the prior lua-fmt attempt and existing CI checks; use these to scope the style rules and enforcement. Done means documenting the rules, updating configuration, applying the mass-format change, and adding .git-blame-ignore-revs.

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

Descripción

enhancement

I think it would be a good idea to establish and begin enforcing (via code reviews and CI checks) style rules for this repository just like we do for mtasa-blue. To this end, I have submitted a PR that adds a .editorconfig file that defines the following basic rules:

  • No trailing whitespace
  • Insert final newlines
  • Use 4 spaces instead of tabs
  • Use CRLF line endings

Line endings

There has been some inconsistency regarding which type of line endings are meant to be used. The .gitattributes file calls for LF endings and it's been mentioned that in the long-term we want LF, but a recent commit seems to have standardized on CRLF. I guess deciding on this would be the first order of buisness.

CI checks

On CI, there have been previous attempts to use lua-fmt to automate formatting checks. It looks like these efforts have stagnated. Perhaps it would be possible to either a) restart work on lua-fmt or b) do something else? I was thinking perhaps we can just run a simple CI check for the style rules I've described above.

Mass-edits and ignore-revs

Once we've decided on a set of rules and implemented the controls to enforce them, another mass-formatting edit will be needed. We should add a .git-blame-ignore-revs file to filter this and previous such commits out.

TLDR

  • establish basic style rules and document them
  • update .editorconfig and .gitattributes accordingly
  • setup related CI checks
  • issue mass-format commit
  • setup .git-blame-ignore-revs
Lenguaje dominante
Lua
Estrellas
185
Forks
180
Merge medio
5 d 13 h
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 multitheftauto/mtasa-resources

Todos los issues de multitheftauto/mtasa-resources

Issues similares

Más issues de Lua

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.