Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13215994
D10997.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10997.diff
View Options
diff --git a/src/lint/linter/ArcanistCSharpLinter.php b/src/lint/linter/ArcanistCSharpLinter.php
--- a/src/lint/linter/ArcanistCSharpLinter.php
+++ b/src/lint/linter/ArcanistCSharpLinter.php
@@ -86,6 +86,8 @@
return;
}
+ $this->projectRoot = $this->getEngine()->getWorkingCopy()->getProjectRoot();
+
// Determine runtime engine (.NET or Mono).
if (phutil_is_windows()) {
$this->runtimeEngine = '';
@@ -99,6 +101,8 @@
$cslint = $this->cslintHintPath;
if ($cslint !== null && file_exists($cslint)) {
$this->cslintEngine = Filesystem::resolvePath($cslint);
+ } else if ($cslint !== null && file_exists($this->projectRoot.DIRECTORY_SEPARATOR.$cslint)) {
+ $this->cslintEngine = Filesystem::resolvePath($this->projectRoot.DIRECTORY_SEPARATOR.$cslint);
} else if (Filesystem::binaryExists('cslint.exe')) {
$this->cslintEngine = 'cslint.exe';
} else {
@@ -157,9 +161,10 @@
// settings JSON through base64-encoded to mitigate
// this issue.
$futures[] = new ExecFuture(
- '%C --settings-base64=%s -r=. %Ls',
+ '%C --settings-base64=%s -r=%s %Ls',
$this->runtimeEngine.$this->cslintEngine,
base64_encode(json_encode($this->discoveryMap)),
+ $this->projectRoot,
$current_paths);
$current_paths = array();
}
@@ -172,9 +177,10 @@
// a future for those too.
if (count($current_paths) > 0) {
$futures[] = new ExecFuture(
- '%C --settings-base64=%s -r=. %Ls',
+ '%C --settings-base64=%s -r=%s %Ls',
$this->runtimeEngine.$this->cslintEngine,
base64_encode(json_encode($this->discoveryMap)),
+ $this->projectRoot,
$current_paths);
$current_paths = array();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 18, 9:40 PM (3 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6297875
Default Alt Text
D10997.diff (1 KB)
Attached To
Mode
D10997: Add ability to use csharp linter from everywhere
Attached
Detach File
Event Timeline
Log In to Comment