Summary: This test case is currently failing with various different versions of `puppet-lint`. I was considering fixing this test case, but I feel that we have more than enough test cases for `ArcanistPuppetLintLinter` anyway. Since this is an `ArcanistExternalLinter`, we only really need to test that the bindings are working as expected (rather than the linter functionality).
Test Plan: `arc unit`
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11313
Summary: Without explicitly passing `--error-level=all` to `puppet-lint`, the configuration file for `puppet-lint` could contain `--error-level=error`. This would limit the ability of `arc lint` to detect linter issues and therefore we should override this flag from the command line explicitly.
Test Plan: This is mostly theoretical.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11316
Summary: There's no need for these properties to be (implicitly) public.
Test Plan: N/A
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11276
Summary: We can use `php --run "echo phpversion();"` to return a nice, compact representation of the PHP version.
Test Plan: `arc unit`
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11264
Summary: This directory was missed, but should have been moved in D11202.
Test Plan: `arc unit`
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11262
Summary: I'm not sure whether this is in any coding standards, but it seems to be an unspoken rule that methods should have a visiblity modifier (`public`, `protected` or `private`) explicitly specified. According to the [[http://php.net/manual/en/language.oop5.visibility.php#language.oop5.visiblity-methods | PHP documentation]], methods declared without any explicit visibility keyword are defined as public.
Test Plan: Added a test case.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D10687
Summary: Ref T6822.
Test Plan: Visual inspection. These methods are only called from within the `ArcanistExternalLinter` and `ArcanistLinter` subclasses.
Reviewers: chad, #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Maniphest Tasks: T6822
Differential Revision: https://secure.phabricator.com/D11237
Summary: Ref T6822.
Test Plan: Visual inspection. These methods are only called from within the `ArcanistShellCompleteWorkflow` class.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: Korvin, epriestley
Maniphest Tasks: T6822
Differential Revision: https://secure.phabricator.com/D11238
Summary: Ref T6822. This method needs to be public so that it can be called from `ArcanistLintersWorkflow`.
Test Plan: Ran `arc linters`.
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Maniphest Tasks: T6822
Differential Revision: https://secure.phabricator.com/D11239
Summary: I feel that we are abusing `ArcanistUsageException`. Throw a more tailed exception instead. Depends on D11197.
Test Plan: `arc lint`, I guess.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: avivey, Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11205
Summary: D7952 added namespaces to `ArcanistUnitTestResult` but these are not exported and thus don't get sent from client to server.
Test Plan: Uploaded a diff and inspected the contents of the `phabricator_differential.differential_diffproperty` table.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11208
Summary: Ref T5655. `PHPUnitTestEngineTestCase` is the test case for `PhpunitTestEngine`.
Test Plan: N/A
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: aurelijus, Korvin, epriestley
Maniphest Tasks: T5655
Differential Revision: https://secure.phabricator.com/D11203
Summary: Creates a new base class for unit testing `ArcanistExternalLinter` subclasses. Specifically, add a test case for verifying that we are correctly parsing the output of `$external_linter --version`.
Test Plan: `arc unit`
Reviewers: chad, #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11197
Summary: According to `coffeelint --help`, `--noconfig` ignores the environment variable `COFFEELINT_CONFIG`. This means that `arc lint` will behave more consistently across developer workstations by forcing configuration to be specified with `coffeelint.config` instead of with environment variables.
Test Plan: This is mostly theoretical.
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11196
Summary: According to `coffeelint --help` (with an up-to-date version of `coffeelint`, version 1.8.1) , `--nocolor` is deprecated in favor of `--color=never`. According to the [[http://www.coffeelint.org/#changelog | changelog]], `--nocolor` was deprecated in v1.6.0.
Test Plan: `arc lint`
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11195
Summary: This is a bit magical and is maybe a terrible idea, but it seems okayish.
Test Plan: `arc unit`
Reviewers: chad, #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11172
Summary: Ref T5141. Utilize the `'max'` key from the `php_compat_info.json` compatibility map to lint for the use of classes/functions/symbols which have been removed from the target PHP version.
Test Plan: Added a test case for `arc unit`.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: epriestley, Korvin
Maniphest Tasks: T5141
Differential Revision: https://secure.phabricator.com/D10538
Summary: I don't feel that this linter rule belongs in the `ArcanistTextLinter`. In fact, this linter rule is quite similar to the rules provided by `ArcanistGeneratedLinter` and `ArcanistNoLintLinter` and these classes could possibly be consolidated. I have moved this linter rule to a standalone `ArcanistCommitLinter` class (which could possibly do additional lints in the future).
Test Plan: Moved existing test cases.
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: epriestley, Korvin
Differential Revision: https://secure.phabricator.com/D10473
Summary: Self-explanatory. This is implied anyway as we iterate over it with a `foreach` loop.
Test Plan: `arc unit`
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11174
Summary: This doesn't make too much sense anymore as all modern linters are configured via the `.arclint` file rather than `.arcconfig`.
Test Plan: `grep`ped to make sure this option isn't used.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11173
Summary: Fix a variable name to be consistent with naming conventions.
Test Plan: `arc lint`
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: aurelijus, Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11140
Summary: Currently we output "Waiting for JSON parameters on stdin...", even if `stdin` is piped (for example, from `echo`).
Test Plan:
```lang=bash
> echo '{}' | arc call-conduit conduit.ping
{"error":null,"errorMessage":null,"response":"ip-10-161-81-110"}
> arc call-conduit conduit.ping
Waiting for JSON parameters on stdin...
{}
^D
{"error":null,"errorMessage":null,"response":"ip-10-161-81-110"}
```
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11122
Summary: The `file.uploadhash` method was added a long time ago (in D4899). It should be safe to assume that this method exists on most installs.
Test Plan: N/A
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: epriestley
Differential Revision: https://secure.phabricator.com/D11118
Summary: Ref T5112. The `arc inlines` workflow no longer works because the `differential.getrevisioncomments` API method has been deprecated (see T2222). The command is basically useless right now.
Test Plan: N/A
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: epriestley, Korvin
Maniphest Tasks: T5112
Differential Revision: https://secure.phabricator.com/D9464
Summary:
- The "exclude static variable access" branch in XHPAST incorrectly excluded all variables in a function or method which used any static access (we were selecting the wrong root node for exclusion).
- The "PHPLinter" regexp did not work with 5.4.30. Make it more permissive in what it parses.
Test Plan:
- Added a failing unit test for the variable case and made it pass.
- PHPLinter tests now pass under 5.4.30
Reviewers: joshuaspence, btrahan
Reviewed By: btrahan
Subscribers: epriestley
Differential Revision: https://secure.phabricator.com/D11087
Summary: This unit test is failing locally for me, using v1.1.0 of `puppet-lint`.
Test Plan: `arc unit`
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11057
Summary: Fixes T6773. See also the shameful `PhabricatorDestructableInterface` debacle.
Test Plan: go go dictionary power
Reviewers: btrahan, chad
Reviewed By: chad
Subscribers: epriestley
Maniphest Tasks: T6773
Differential Revision: https://secure.phabricator.com/D11033
Summary:
Ref T5955. If the server supports token-based authentication, prefer it over certificate-based authentication.
Also fixes T3117.
Test Plan:
- Used `arc install-certificate` to install credentials from both token-based and certificate-based hosts.
- Used `arc list` with a token-based host.
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: epriestley
Maniphest Tasks: T3117, T2878, T5955
Differential Revision: https://secure.phabricator.com/D10988