Establish & enforce style rules

オープン
#250 コメント 18 件 リアクション 9 件 担当者 0 名 GitHub で見る

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
github-actions, lua
領域
ci-cd, tooling

調査の方向性

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.

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

説明

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
主要言語
Lua
スター
185
フォーク
180
平均マージ
5日 13時間
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

multitheftauto/mtasa-resources のほかの issue

multitheftauto/mtasa-resources の issue をすべて見る

似ている issue

Lua の issue をもっと見る

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

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