diff --git a/src/docs/userguide/arcanist_lint_unit.diviner b/src/docs/userguide/arcanist_lint_unit.diviner index bb7648d661..1129e40b07 100644 --- a/src/docs/userguide/arcanist_lint_unit.diviner +++ b/src/docs/userguide/arcanist_lint_unit.diviner @@ -30,38 +30,11 @@ make this work, you need to do three things: - add the class name to your ##.arcconfig## as the **lint_engine**, **unit_engine**, or **arcanist_configuration**. -= Write the Class = += Create a libphutil Library = -Start by creating a new phutil library -- this is a directory which will contain -class files for Arcanist to load. You can either put it inside your project, or -outside (if you want to share lint rules between several projects, for -instance). To create a new library, run ##arc liberate##: - - $ arc liberate path/to/new/library - -This will prompt you to name your library and create a new directory on disk. -Create a new ##lint/## directory in this library (or ##unit/##, or whatever you -want). This creates a module. Put ##CustomArcanistLintEngine.php## inside the -##lint/## directory: - - lang=php - array( + 'libcustom' => 'libcustom/src/', + ), + ... + +Now, Phabricator will be able to load classes from your custom library. + += Writing Classes = + +To actually write classes, create a new module and put code in it: + + libcustom/ $ mkdir src/example/ + libcustom/ $ nano src/example/ExampleClass.php # Edit some code. + +Now, run ##arc liberate## to regenerate the static resource map: + + libcustom/ $ arc liberate src/ + +This will automatically create and update ##__init__.php## files, and regenerate +the static map of the library. \ No newline at end of file