]> khamidou — GitHub mirrors - arcanist.git/commit
Add ArcanistLintSeverity::SEVERITY_AUTOFIX.
authorBen Gertzfield <beng@fb.com>
Fri, 6 Apr 2012 19:23:19 +0000 (12:23 -0700)
committerBen Gertzfield <beng@fb.com>
Tue, 10 Apr 2012 19:42:09 +0000 (12:42 -0700)
commit14d49d25658f15e8e6ac94bbb7533565135175dc
treed7010d1b298ef4ac95bd6f44c159fad9d223414b
parent55dce2beeb5637a8e66835ba4c2979746c448956
Add ArcanistLintSeverity::SEVERITY_AUTOFIX.

Summary:
Xcode (a popular code editor on Mac OS X) has no facility
to trim trailing whitespace automatically.

This adds a new lint severity "AUTOFIX" that's between
WARNING and ERROR. When running the linter, any lint message
whose severity is AUTOFIX will automatically be patched.

Furthermore, if all lint messages returned from the engine are
AUTOFIX, we'll automatically amend HEAD with the patch.

Test Plan:
arc lint on files with and without trailing whitespace,
with and without UTF-8 contents to confirm those still error

Reviewers: epriestley, jungejason

Reviewed By: epriestley

CC: aran
Differential Revision: https://secure.phabricator.com/D2125
src/lint/linter/text/ArcanistTextLinter.php
src/lint/message/ArcanistLintMessage.php
src/lint/renderer/ArcanistLintRenderer.php
src/lint/result/ArcanistLintResult.php
src/lint/severity/ArcanistLintSeverity.php
src/workflow/diff/ArcanistDiffWorkflow.php
src/workflow/lint/ArcanistLintWorkflow.php