Arc Lint is used in Freelancer to provide a consistent linting experience across different repositories.
Navigate to the project root directory and update .arclint
to update lint rules.
Navigate to the project root directory and run:
arc lint
Linters act as adapters between the linting engine and the actual linting tool. They invoke the linting tool and parse the results into a format that Arcanist can understand. To add a new linter, follow these steps:
- Create a New Linter Class:
- Add a class that extends
ArcanistLinter
in thesrc/lint/linter
directory.
- Add Unit Tests:
- Write unit tests for the new linter in the
src/lint/__tests__/
directory.
- Generate Library Map:
- Run
arc liberate
to generate thesrc/__phutil_library_map__.php
file.
- Bump
flarc
version (recommended):
- Update the
flarc
version a new version. see README.md.