Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistSvnHookPreCommitWorkflow.php
| Show First 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | public function run() { | ||||
| foreach ($results as $result) { | foreach ($results as $result) { | ||||
| if (!$result->getMessages()) { | if (!$result->getMessages()) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| $failures[] = $result; | $failures[] = $result; | ||||
| } | } | ||||
| if ($failures) { | if ($failures) { | ||||
| $at = "@"; | $at = '@'; | ||||
| $msg = phutil_console_format( | $msg = phutil_console_format( | ||||
| "\n**LINT ERRORS**\n\n". | "\n**LINT ERRORS**\n\n". | ||||
| "This changeset has lint errors. You must fix all lint errors before ". | "This changeset has lint errors. You must fix all lint errors before ". | ||||
| "you can commit.\n\n". | "you can commit.\n\n". | ||||
| "You can add '{$at}bypass-lint' to your commit message to disable ". | "You can add '{$at}bypass-lint' to your commit message to disable ". | ||||
| "lint checks for this commit, or '{$at}nolint' to the file with ". | "lint checks for this commit, or '{$at}nolint' to the file with ". | ||||
| "errors to disable lint for that file.\n\n"); | "errors to disable lint for that file.\n\n"); | ||||
| echo phutil_console_wrap($msg); | echo phutil_console_wrap($msg); | ||||
| Show All 11 Lines | |||||