]> khamidou — GitHub mirrors - arcanist.git/commit
Ready more linters and linter functions for .arclint
authorepriestley <git@epriestley.com>
Mon, 26 Aug 2013 12:37:10 +0000 (05:37 -0700)
committerepriestley <git@epriestley.com>
Mon, 26 Aug 2013 12:37:10 +0000 (05:37 -0700)
commit0f30aca626f2477653062893558c9002aad803cf
treec8848a0915c8f37920a849224a6cefeabd204642
parent57bc582ad273c238938ac53a7c0d4eb1fdeb013d
Ready more linters and linter functions for .arclint

Summary:
Ref T3186. Ref T2039. Continues work on readying linters for `.arclint`.

  - **Ruby**: Make this an ExternalLinter.
  - **Priority**: Currently, linters have an implicit "correct" order (notably, the "NoLint" linter needs to run before other linters). Make this explicit by introducing `getLinterPriority()`.
  - **Binaries**: Currently, linters manually reject binary files. Instead, reject binary files by default (linters can override this if they do want to lint binary files).
  - **Deleted Files**: Currently, linters manually reject deleted files (usually in engines). Instead, reject deleted files by default (linters can override this).
  - **Severity**: Move this `.arclint` config option up to top level.
  - **willLintPaths()**: This method is abstract, but almost all linters provide a trivial implementation. Provide a trivial implementation in the base class.
  - **getLintSeverityMap()/getLintNameMap()**: A bunch of linters have empty implementations; these are redundant. Remove them.
  - **Spelling**: clean up some dead / test-only / unconventional code.
  - **`.arclint`**: Allow the filename, generated, nolint, text, spelling and ruby linters to be configured via `.arclint`.

Test Plan:
https://github.com/epriestley/arclint-examples/commit/458beca3d65b64d52ed612904ae66eb837118b94

Ran unit tests.

Reviewers: btrahan

Reviewed By: btrahan

CC: Firehed, aran
Maniphest Tasks: T2039, T3186

Differential Revision: https://secure.phabricator.com/D6805
15 files changed:
src/__phutil_library_map__.php
src/lint/engine/ArcanistLintEngine.php
src/lint/engine/ComprehensiveLintEngine.php
src/lint/engine/PhutilLintEngine.php
src/lint/linter/ArcanistExternalLinter.php
src/lint/linter/ArcanistFilenameLinter.php
src/lint/linter/ArcanistGeneratedLinter.php
src/lint/linter/ArcanistLinter.php
src/lint/linter/ArcanistNoLintLinter.php
src/lint/linter/ArcanistRubyLinter.php
src/lint/linter/ArcanistScalaSBTLinter.php
src/lint/linter/ArcanistSpellingLinter.php
src/lint/linter/ArcanistTextLinter.php
src/lint/linter/__tests__/ArcanistSpellingLinterTestCase.php
src/lint/linter/__tests__/spelling/spell.lint-test