1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-01-08 13:51:01 +01:00
phorge-arcanist/src/lint/linter
epriestley be67df6118 Extract and cover the logic for "trimming" a lint message
Summary:
Ref T9846. Sometimes, a lint message says to replace "the big bad wolf" with "the huge bad wolf": that is, the original and replacement text are the same at the beginning, or the end, or both.

To make this easier for humans to understand, we want to just show that "big" is being replaced with "huge", not that the entire phrase is being replaced.

This logic currently happens inline in console rendering. Pull it out and cover it so a future change can simplify console rendering.

Test Plan: Ran unit tests.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9846

Differential Revision: https://secure.phabricator.com/D18509
2017-08-31 13:28:01 -07:00
..
__tests__ Extract and cover the logic for "trimming" a lint message 2017-08-31 13:28:01 -07:00
exception Move linter exception classes to src/lint/linter/exception 2015-01-12 06:46:23 +11:00
standards Add ArcanistRaggedClassTreeEdgeXHPASTLinterRule to Phutil linter map 2017-04-25 10:58:21 -07:00
xhpast Fix ArcanistPHPCloseTagXHPASTLinterRule always bailing out 2017-07-22 03:48:37 +01:00
ArcanistBaseXHPASTLinter.php Fix errors found by PHPStan 2017-02-16 13:54:43 +00:00
ArcanistChmodLinter.php Add unit tests for ArcanistChmodLinter 2015-01-15 06:58:11 +11:00
ArcanistClosureLinter.php Prefer pip to easy_install 2016-04-29 15:45:11 +00:00
ArcanistCoffeeLintLinter.php Improve behavior for detecting the failure to parse external linter output 2015-05-22 07:30:17 +10:00
ArcanistComposerLinter.php update linter short desc 2015-09-08 14:52:43 -07:00
ArcanistCppcheckLinter.php update linter short desc 2015-09-08 14:52:43 -07:00
ArcanistCpplintLinter.php Cleans up some minor issues in cpplint 2016-01-15 08:19:23 -08:00
ArcanistCSharpLinter.php pht all the things 2015-05-13 21:00:53 +10:00
ArcanistCSSLintLinter.php Fix ArcanistCSSLintLinter issue for messages without line number 2015-11-17 07:14:13 -08:00
ArcanistExternalLinter.php External linters can now specify a version requirement. 2015-10-21 09:46:20 -07:00
ArcanistFilenameLinter.php Fix visibility of various ArcanistLinter methods 2015-01-07 07:36:07 +11:00
ArcanistFlake8Linter.php Improve the flake8 line-matching regex 2017-03-24 09:19:06 -07:00
ArcanistFutureLinter.php Split large path lists into blocks when linting 2015-04-22 05:15:57 -07:00
ArcanistGeneratedLinter.php pht all the things 2015-05-13 21:00:53 +10:00
ArcanistGoLintLinter.php Set path on more linters 2015-10-02 08:58:15 -07:00
ArcanistHLintLinter.php update linter short desc 2015-09-08 14:52:43 -07:00
ArcanistInlineHTMLXHPASTLinterRule.php Improve the "inline HTML" linter rule 2015-08-19 15:34:43 +10:00
ArcanistJscsLinter.php Set path on more linters 2015-10-02 08:58:15 -07:00
ArcanistJSHintLinter.php update linter short desc 2015-09-08 14:52:43 -07:00
ArcanistJSONLinter.php phtize a bunch more strings 2015-05-22 17:09:56 +10:00
ArcanistJSONLintLinter.php Set path on more linters 2015-10-02 08:58:15 -07:00
ArcanistLesscLinter.php More linter's short description 2015-09-14 11:52:24 -07:00
ArcanistLinter.php Fix incorrect variable for linter standards 2016-04-29 08:00:07 +00:00
ArcanistMergeConflictLinter.php Minor reordering of functions 2014-09-22 18:42:41 +10:00
ArcanistNoLintLinter.php Remove severity options from some linters. 2014-05-11 19:28:27 -07:00
ArcanistPEP8Linter.php Prefer pip to easy_install 2016-04-29 15:45:11 +00:00
ArcanistPhpcsLinter.php Improve validation of 'name' and 'code' parameters for lint messages 2015-09-25 11:16:04 -07:00
ArcanistPhpLinter.php pht all the things 2015-05-13 21:00:53 +10:00
ArcanistPhutilLibraryLinter.php phtize a bunch more strings 2015-05-22 17:09:56 +10:00
ArcanistPuppetLintLinter.php Improve behavior for detecting the failure to parse external linter output 2015-05-22 07:30:17 +10:00
ArcanistPyFlakesLinter.php Set path on more linters 2015-10-02 08:58:15 -07:00
ArcanistPyLintLinter.php Recover from PyLint raising messages at character "-1" 2015-08-24 21:11:54 -07:00
ArcanistRuboCopLinter.php update linter short desc 2015-09-08 14:52:43 -07:00
ArcanistRubyLinter.php Fix parsing of ruby version for ArcanistRubyLinter 2015-11-20 10:27:21 +11:00
ArcanistScriptAndRegexLinter.php If the Script-and-Regex linter captures no "line" text, treat the message as affecting the entire file 2016-01-11 17:37:34 -08:00
ArcanistSpellingLinter.php Test XHPAST linter rules in isolation 2015-11-19 08:57:23 +11:00
ArcanistTextLinter.php Detect trailing spaces and tabs 2017-05-03 03:29:14 -07:00
ArcanistXHPASTLinter.php Add a table showing all XHPAST linter rules to the output of arc linters xhpast 2015-12-02 06:27:33 +11:00
ArcanistXMLLinter.php pht all the things 2015-05-13 21:00:53 +10:00
reporter.js Don't use error context from JSHint in linter messages 2014-06-23 10:33:01 +10:00