Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14415067
D12697.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D12697.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -40,8 +40,6 @@
'ArcanistCoffeeLintLinterTestCase' => 'lint/linter/__tests__/ArcanistCoffeeLintLinterTestCase.php',
'ArcanistCommentRemover' => 'parser/ArcanistCommentRemover.php',
'ArcanistCommentRemoverTestCase' => 'parser/__tests__/ArcanistCommentRemoverTestCase.php',
- 'ArcanistCommitLinter' => 'lint/linter/ArcanistCommitLinter.php',
- 'ArcanistCommitLinterTestCase' => 'lint/linter/__tests__/ArcanistCommitLinterTestCase.php',
'ArcanistCommitWorkflow' => 'workflow/ArcanistCommitWorkflow.php',
'ArcanistCompilerLintRenderer' => 'lint/renderer/ArcanistCompilerLintRenderer.php',
'ArcanistComprehensiveLintEngine' => 'lint/engine/ArcanistComprehensiveLintEngine.php',
@@ -247,8 +245,6 @@
'ArcanistCoffeeLintLinter' => 'ArcanistExternalLinter',
'ArcanistCoffeeLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
'ArcanistCommentRemoverTestCase' => 'ArcanistTestCase',
- 'ArcanistCommitLinter' => 'ArcanistLinter',
- 'ArcanistCommitLinterTestCase' => 'ArcanistLinterTestCase',
'ArcanistCommitWorkflow' => 'ArcanistWorkflow',
'ArcanistCompilerLintRenderer' => 'ArcanistLintRenderer',
'ArcanistComprehensiveLintEngine' => 'ArcanistLintEngine',
diff --git a/src/lint/linter/ArcanistCommitLinter.php b/src/lint/linter/ArcanistCommitLinter.php
deleted file mode 100644
--- a/src/lint/linter/ArcanistCommitLinter.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-final class ArcanistCommitLinter extends ArcanistLinter {
-
- const LINT_NO_COMMIT = 1;
-
- public function getInfoName() {
- return pht('Commit Linter');
- }
-
- public function getInfoDescription() {
- return pht('Ensures that specially marked files are not committed.');
- }
-
- public function getLinterPriority() {
- return 0.5;
- }
-
- public function getLinterName() {
- return 'COMMIT';
- }
-
- public function getLinterConfigurationName() {
- return 'commit';
- }
-
- public function getLintNameMap() {
- return array(
- self::LINT_NO_COMMIT => pht('Explicit %s', '@no'.'commit'),
- );
- }
-
- protected function canCustomizeLintSeverities() {
- return false;
- }
-
- public function lintPath($path) {
- if ($this->getEngine()->getCommitHookMode()) {
- $this->lintNoCommit($path);
- }
- }
-
- private function lintNoCommit($path) {
- $data = $this->getData($path);
-
- $deadly = '@no'.'commit';
- $offset = strpos($data, $deadly);
-
- if ($offset !== false) {
- $this->raiseLintAtOffset(
- $offset,
- self::LINT_NO_COMMIT,
- pht(
- 'This file is explicitly marked as "%s", which blocks commits.',
- $deadly),
- $deadly);
- }
- }
-
-}
diff --git a/src/lint/linter/__tests__/ArcanistCommitLinterTestCase.php b/src/lint/linter/__tests__/ArcanistCommitLinterTestCase.php
deleted file mode 100644
--- a/src/lint/linter/__tests__/ArcanistCommitLinterTestCase.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-final class ArcanistCommitLinterTestCase extends ArcanistLinterTestCase {
-
- public function testLinter() {
- return $this->executeTestsInDirectory(dirname(__FILE__).'/commit/');
- }
-
-}
diff --git a/src/lint/linter/__tests__/commit/nocommit-hook.lint-test b/src/lint/linter/__tests__/commit/nocommit-hook.lint-test
deleted file mode 100644
--- a/src/lint/linter/__tests__/commit/nocommit-hook.lint-test
+++ /dev/null
@@ -1,8 +0,0 @@
-@nocommit
-~~~~~~~~~~
-error:1:1
-~~~~~~~~~~
-~~~~~~~~~~
-{
- "hook": true
-}
diff --git a/src/lint/linter/__tests__/commit/nocommit-nohook.lint-test b/src/lint/linter/__tests__/commit/nocommit-nohook.lint-test
deleted file mode 100644
--- a/src/lint/linter/__tests__/commit/nocommit-nohook.lint-test
+++ /dev/null
@@ -1,2 +0,0 @@
-@nocommit
-~~~~~~~~~~
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 4:56 PM (11 h, 46 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6927169
Default Alt Text
D12697.diff (3 KB)
Attached To
Mode
D12697: Remove commit linter
Attached
Detach File
Event Timeline
Log In to Comment