tagview / arcanist-extensions Goto Github PK
View Code? Open in Web Editor NEWAwesome Arcanist extensions!
License: MIT License
Awesome Arcanist extensions!
License: MIT License
I integrated the rubocop extension but no ruby file is being inspected when I execute arc diff <branch-name>
I just see the output:
Linting...
LINT OKAY No lint problems.
From my .arcconfig
...
"load": [
"arcanist-extensions/multi_test_engine",
"arcanist-extensions/tap_test_engine"
],
"unit.engine": "MultiTestEngine",
"unit.engine.multi-test.engines": [
{
"engine": "TapTestEngine",
"unit.engine.tap.command": "grunt app-tests"
}
]
}
If I change it to
"engine": "TAPTestEngine"
things work fine.
Greetings,
Many thanks for this repo, has helped my team streamline a lot of our work.
And with the recent addition of the ESLint engine we were more than excited to update our arc-extensions.
But after updating and setting it as per instructions,
I always get an output like this,
OKAY No lint warnings.
I went ahead to debug the php source and found out that changing this,
public function willLintPaths(array $paths) {
$this->checkEslintInstallation();
$this->execution = new ExecFuture('eslint --format=json --no-color ' . implode($paths, ' '));
}
to this,
public function willLintPaths(array $paths) {
$this->checkEslintInstallation();
// print_r('eslint --format=json --no-color ' . implode($paths, ' '));
$this->execution = new ExecFuture('eslint --format=json --no-color ' . implode($paths, ' '));
$this->didRunLinters();
}
solved it.
I'm using TapTestEngine to execute a command like grunt test
which tests some js code. But I'd like to only run that test if one of the changed files matches some sort of regex. It seems like arc wants that logic to be part of the Test Engine, so maybe this could be implemented with unit.engine.tap.regex or something?
Eslint can be enhanced to take eslintrc.js configuration file from project root folder.
Currently the error code isn't being checked when unit tests are ran.
https://github.com/tagview/arcanist-extensions/blob/master/tap_test_engine/src/TAPTestEngine.php#L17
I have little understanding about PHP, but here's my hacky workaround:
list($error, $stdout, $stderr) = $future->resolve();
if ($error <> 0) {
$msg = "not ok 0 - Unit test returned non-zero exit\n";
echo $msg;
return $this->parseOutput($msg);
}
I am trying to have rspec set as test engine for a project I am working on.
However, Here is the error that is throwing out
Running unit tests...
[2016-06-02 11:53:43] ERROR 2: Invalid argument supplied for foreach() at [/Users/admin/dev/kantid/.arcanist-extensions/rspec_test_engine/src/RSpecTestEngine.php:31]
arcanist(head=master, ref.master=2234c8cacc21), phutil(head=master, ref.master=bd56873ae4c0), rspec-test-engine()
#0 RSpecTestEngine::parseOutput(string) called at [<rspec-test-engine>/src/RSpecTestEngine.php:19]
#1 RSpecTestEngine::run() called at [<arcanist>/src/workflow/ArcanistUnitWorkflow.php:167]
#2 ArcanistUnitWorkflow::run() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1340]
#3 ArcanistDiffWorkflow::runUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1228]
#4 ArcanistDiffWorkflow::runLintUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:483]
#5 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:392]
While I know it's not precisely an extendible test engine like TapTestEngine, it does only work in the MultiTestEngine context.. I'm happy to send a PR if you're cool with it.
final class GoTestEngine extends ArcanistUnitTestEngine {
public function run() {
$command = $this->getConfigurationManager()->getConfigFromAnySource('unit.engine.go.command');
$future = new ExecFuture($command);
do {
list($stdout, $stderr) = $future->read();
echo $stdout;
echo $stderr;
sleep(0.5);
} while (!$future->isReady());
list($error, $stdout, $stderr) = $future->resolve();
$parser = new ArcanistGoTestResultParser();
return $parser->parseTestResults("", $stdout);
}
}
I think it's better to call a local version of ESLint first before going for a global one.
There are cases that $offense['source'] is undefined which prints an error while doing arc lint. I worked around this by checking the content of $offense['source'] first before running $message->setCode($offense['source']);
If you have two tap tests this line won't work, it pulls the first matching config line that matches "unit.engine.tap.command".
Why not pull from actual runtime config for this class and just call the option "command" - seems cleaner, no?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.