Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2895015
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/lint/linter/ArcanistCommitLinter.php b/src/lint/linter/ArcanistCommitLinter.php
index 17648335..5a4c5c26 100644
--- a/src/lint/linter/ArcanistCommitLinter.php
+++ b/src/lint/linter/ArcanistCommitLinter.php
@@ -1,56 +1,60 @@
<?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);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Jan 19 2025, 20:49 (6 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1128607
Default Alt Text
(1 KB)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment