freelancer / flarc Goto Github PK
View Code? Open in Web Editor NEWArcanist extensions used at Freelancer.com.
License: Apache License 2.0
Arcanist extensions used at Freelancer.com.
License: Apache License 2.0
There is a bug in /src/lint/linter/ArcanistESLintLinter.php in the return statement for parseLinterOutput function
This causes the following error when linting more than 1 file and at least 1 of the files contains no lint errors
How to reproduce
run arc lint fileA.js fileB.js
and you will get the exception below.
Exception
Some linters failed:
- CommandException: Command failed with error #1!
The cause is because the return statement is inside of the foreach instead of outside of it
I have attached a simple diff below that resolves the issue
diff --git a/src/lint/linter/ArcanistESLintLinter.php b/src/lint/linter/ArcanistESLintLinter.php
index da63528..7b23d44 100644
--- a/src/lint/linter/ArcanistESLintLinter.php
+++ b/src/lint/linter/ArcanistESLintLinter.php
@@ -192,9 +192,10 @@ final class ArcanistESLintLinter extends ArcanistBatchExternalLinter {
$results[] = $result;
}
-
- return $results;
}
+
+ return $results;
+
}
}
Looks like the source
key is on $file
not $message
- it is used from there in the auto-fix branch later.
[2019-05-02 19:54:35] ERROR 8: Undefined index: source at [/usr/local/src/.../src/lint/ArcanistESLintLinter.php:157]
arc-...(), arcanist(head=experimental, ref.experimental=637c6584c6ea), phutil(head=master, ref.master=cad1985726c9)
#0 ArcanistESLintLinter::parseLinterOutput(string, integer, string, string) called at [<arcanist>/src/lint/linter/ArcanistExternalLinter.php:437]
#1 ArcanistExternalLinter::resolveFuture(string, ExecFuture) called at [<arcanist>/src/lint/linter/ArcanistFutureLinter.php:34]
#2 ArcanistFutureLinter::didLintPaths(array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:595]
#3 ArcanistLintEngine::executeDidLintOnPaths(ArcanistESLintLinter, array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:546]
#4 ArcanistLintEngine::executeLintersOnChunk(array, array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:474]
#5 ArcanistLintEngine::executeLinters(array) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:206]
#6 ArcanistLintEngine::run() called at [<arcanist>/src/workflow/ArcanistLintWorkflow.php:219]
#7 ArcanistLintWorkflow::run() called at [<arcanist>/scripts/arcanist.php:420]
I was doing code research on the web. I came across your page. And I examined it. I like it so much. Your team and your posts are very helpful. I would love to be with you both to be informed and to support you.
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.