Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JsHint Exit Code(s)

I am using JsHint in a Makefile for a project I am working on and the errors that are reported are not being noticed by Make. Is there a way to capture the error and not hard exit the execution of Make? Below is a sample Makefile:

all: css js

css:
    compass compile

hint:
    jshint js/*.js

js: hint
    uglify js/*.js

So, for example, the hint target is showing errors but is doing a hard exit and not informing Make that it exited.

I might not be using the correct terms for things and I apologize.

like image 716
kalisjoshua Avatar asked Nov 11 '22 15:11

kalisjoshua


1 Answers

Use a hyphen before the recipe…

hint:
    -jshint js/*.js
like image 145
Shammel Lee Avatar answered Dec 28 '22 03:12

Shammel Lee