1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-24 06:20:55 +01:00
phorge-arcanist/scripts
epriestley 8b7a5157f8 Allow global config to load libraries and set test engines
Summary:
Khan Academy is looking into lint configuration, but doesn't use ".arcconfig" because they have a large number of repositories. Making configuration more flexible generally gives us more options for onboarding installs.

  - Currently, only project config (".arcconfig") can load libraries. Allow user config ("~/.arcrc") to load libraries as well.
  - Currently, only project config can set lint/unit engines. Allow user config to set default lint/unit engines.
  - Add some type checking to "arc set-config".
  - Add "arc set-config --show".

Test Plan:
  - **load**
    - Ran `arc set-config load xxx`, got error about format.
    - Ran `arc set-config load ["apple"]`, got warning on running 'arc' commands (no such library) but was able to run 'arc set-config' again to clear it.
    - Ran `arc set-config load ["/path/to/a/lib/src/"]`, worked.
    - Ran `arc list --trace`, verified my library loaded in addition to `.arcconfig` libraries.
    - Ran `arc list --load-phutil-library=xxx --trace`, verified only that library loaded.
    - Ran `arc list --trace --load-phutil-library=apple --trace`, got hard error about bad library.
    - Set `.arcconfig` to point at a bad library, verified hard error.
  - **lint.engine** / **unit.engine**
    - Removed lint engine from `.arcconfig`, ran "arc lint", got a run with specified engine.
    - Removed unit engine from `.arcconfig`, ran "arc unit", got a run with specified engine.
  - **--show**
    - Ran `arc set-config --show`.
  - **misc**
    - Ran `arc get-config`.

Reviewers: csilvers, btrahan, vrana

Reviewed By: csilvers

CC: aran

Differential Revision: https://secure.phabricator.com/D2618
2012-05-31 11:41:39 -07:00
..
__init_script__.php Change order of include_path 2012-05-25 10:08:28 -07:00
arcanist.php Allow global config to load libraries and set test engines 2012-05-31 11:41:39 -07:00
phutil_analyzer.php Depend on autoloading 2012-05-30 16:02:36 -07:00
phutil_mapper.php Depend on autoloading 2012-05-30 16:02:36 -07:00
phutil_rebuild_map.php Add "ArcanistPhutilLibraryLinter" to replace "ArcanistPhutilModuleLinter" 2012-05-30 07:25:09 -07:00
phutil_symbols.php Minor, address feedback from @vrana on D2585. 2012-05-30 07:33:46 -07:00