1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 08:58:55 +02: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:
epriestley 2012-03-29 13:21:10 -07:00
parent 30f036c6b9
commit ff94d699fe
4 changed files with 4 additions and 20 deletions

View file

@ -398,10 +398,9 @@ final class ArcanistPhutilModuleLinter extends ArcanistLinter {
$old_file, $old_file,
$new_file); $new_file);
$message->setDependentMessages($resolvable); $message->setDependentMessages($resolvable);
foreach ($resolvable as $message) { foreach ($resolvable as $resolvable_message) {
$message->setObsolete(true); $resolvable_message->setObsolete(true);
} }
$message->setGenerateFile(true);
} }
} }

View file

@ -33,7 +33,6 @@ final class ArcanistLintMessage {
protected $originalText; protected $originalText;
protected $replacementText; protected $replacementText;
protected $appliedToDisk; protected $appliedToDisk;
protected $generateFile;
protected $dependentMessages = array(); protected $dependentMessages = array();
protected $obsolete; protected $obsolete;
@ -149,15 +148,6 @@ final class ArcanistLintMessage {
return ($this->getLine() !== null); 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) { public function setObsolete($obsolete) {
$this->obsolete = $obsolete; $this->obsolete = $obsolete;
return $this; return $this;

View file

@ -1,7 +1,7 @@
<?php <?php
/* /*
* Copyright 2011 Facebook, Inc. * Copyright 2012 Facebook, Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -87,12 +87,6 @@ final class ArcanistLintResult {
unset($messages[$key]); unset($messages[$key]);
continue; continue;
} }
if ($message->getGenerateFile()) {
$messages = array(
$key => $message,
);
break;
}
} }
$map = array(); $map = array();

View file

@ -10,6 +10,7 @@ phutil_require_module('arcanist', 'exception/usage');
phutil_require_module('arcanist', 'workflow/base'); phutil_require_module('arcanist', 'workflow/base');
phutil_require_module('phutil', 'console'); phutil_require_module('phutil', 'console');
phutil_require_module('phutil', 'utils');
phutil_require_source('ArcanistHelpWorkflow.php'); phutil_require_source('ArcanistHelpWorkflow.php');