mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Minor Arcanist fixes
Summary: Addresses concerns in rARCefb8219196abf047f14b505959e54d078e1df6d3: - As I recall, the intent of "generateFile" was that these warnings would replace all the other warnings for that file, under the theory that if one warning caused regeneration of the file the other warnings were irrelevant. - However, this code never had any effect and I haven't seen any issues with the behavior. - So, just remove it. Addresses concerns in rARC070e963d1c26879e47eab19a2377e388c2f166c5: - Ran "arc liberate --all". Test Plan: Ran "arc lint" after removing an "__init__.php" with and without a "fixed" generateFile block, there was no behavioral change. So I just nuked it. Reviewers: vrana, btrahan Reviewed By: vrana CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D2049
This commit is contained in:
parent
30f036c6b9
commit
ff94d699fe
4 changed files with 4 additions and 20 deletions
|
@ -398,10 +398,9 @@ final class ArcanistPhutilModuleLinter extends ArcanistLinter {
|
|||
$old_file,
|
||||
$new_file);
|
||||
$message->setDependentMessages($resolvable);
|
||||
foreach ($resolvable as $message) {
|
||||
$message->setObsolete(true);
|
||||
foreach ($resolvable as $resolvable_message) {
|
||||
$resolvable_message->setObsolete(true);
|
||||
}
|
||||
$message->setGenerateFile(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ final class ArcanistLintMessage {
|
|||
protected $originalText;
|
||||
protected $replacementText;
|
||||
protected $appliedToDisk;
|
||||
protected $generateFile;
|
||||
protected $dependentMessages = array();
|
||||
protected $obsolete;
|
||||
|
||||
|
@ -149,15 +148,6 @@ final class ArcanistLintMessage {
|
|||
return ($this->getLine() !== null);
|
||||
}
|
||||
|
||||
public function setGenerateFile($generate_file) {
|
||||
$this->generateFile = $generate_file;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getGenerateFile() {
|
||||
return $this->generateFile;
|
||||
}
|
||||
|
||||
public function setObsolete($obsolete) {
|
||||
$this->obsolete = $obsolete;
|
||||
return $this;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -87,12 +87,6 @@ final class ArcanistLintResult {
|
|||
unset($messages[$key]);
|
||||
continue;
|
||||
}
|
||||
if ($message->getGenerateFile()) {
|
||||
$messages = array(
|
||||
$key => $message,
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$map = array();
|
||||
|
|
|
@ -10,6 +10,7 @@ phutil_require_module('arcanist', 'exception/usage');
|
|||
phutil_require_module('arcanist', 'workflow/base');
|
||||
|
||||
phutil_require_module('phutil', 'console');
|
||||
phutil_require_module('phutil', 'utils');
|
||||
|
||||
|
||||
phutil_require_source('ArcanistHelpWorkflow.php');
|
||||
|
|
Loading…
Reference in a new issue