Permalink
Browse files

do not consider return code=1 as error

  • Loading branch information...
1 parent bd6eb0c commit 831174186e13f547dd30ca4fbd9a59a07bbcb0d2 @JPMoresmau committed Dec 26, 2012
@@ -2,7 +2,7 @@
<feature
id="net.sf.eclipsefp.haskell"
label="%bundleName"
- version="2.4.1"
+ version="2.4.2"
provider-name="%bundleVendor">
<description>
@@ -151,7 +151,7 @@ available at http://www.eclipse.org/legal/epl-v10.html.
id="net.sf.eclipsefp.haskell.hlint"
download-size="0"
install-size="0"
- version="2.3.2"
+ version="2.4.2"
unpack="false"/>
<plugin
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: net.sf.eclipsefp.haskell.hlint;singleton:=true
-Bundle-Version: 2.3.2
+Bundle-Version: 2.4.2
Bundle-Activator: net.sf.eclipsefp.haskell.hlint.HLintPlugin
Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
@@ -35,11 +35,18 @@
if (exe==null || exe.length()==0){
exe="hlint"; // hope it's in the path
}
+ // code is 1 if we have errors!
int code=new ProcessRunner().executeBlocking(path.toFile().getParentFile(), out, err, exe, path.toOSString());
- if (code==0){
- OutputParser parser = new OutputParser(new StringReader(out.toString()));
- return parser.suggestions();
+
+ OutputParser parser = new OutputParser(new StringReader(out.toString()));
+ List<Suggestion> sugs= parser.suggestions();
+ if(err.toString().length()>0){
+ HLintPlugin.logError(NLS.bind(HLintText.error_run,err.toString()),null);
+ } else if (code!=0 && sugs.size()==0){
+ HLintPlugin.logError(NLS.bind(HLintText.error_run,out.toString()),null);
}
+ return sugs;
+
} catch (Throwable ex) {
String msg=err.toString().length()>0?err.toString():out.toString();
HLintPlugin.logError(NLS.bind(HLintText.error_run,msg), ex);

0 comments on commit 8311741

Please sign in to comment.