mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-19 13:35:28 +00:00
19d568d506
This replaces the previous arclint linter for checking the copyright year in license headers with a gitea workflow job. As the date of last edit might differ from commit date due to reverts the copyright linter is run against a base commit. The python script doing the heavy lifting is written by @Dunedan. Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com> Co-Authored-by: Dunedan <dunedan@phoenitydawn.de>
Linting
This folder contains tools for linting 0 A.D. code Linting is done via Arcanist: https://secure.phabricator.com/book/phabricator/article/arcanist_lint/
Linters
textis configured to detect whitespace issues.jsondetects JSON syntax errors.eslint, if installed, will run on javascript files.
Installation
This assumes you have arcanist already installed. If not, consult https://gitea.wildfiregames.com/0ad/0ad/wiki/Phabricator#UsingArcanist .
The linting is done via custom PHP scripts, residing in pyrolint/.
Configuration is at the root of the project, under .arclint.
Installing linters
We provide dummy replacement for external linters, so that they are not required.
eslint
Installation via npm is recommended. The linter assumes a global installation of both eslint and the "brace-rules" plugin.
npm install -g eslint@latest eslint-plugin-brace-rules`