sublimeye / jshint-jenkins-checkstyle-reporter Goto Github PK
View Code? Open in Web Editor NEWJSHint reporter properly supported by Jenkins "JSHint report plug-in
License: MIT License
JSHint reporter properly supported by Jenkins "JSHint report plug-in
License: MIT License
This code's check using !valueObject[attr]
will fail on falsy values such as '0':
function makeAttribute(attr, valueObject) {
if (!valueObject[attr]) {
throw Error('No property '+attr+' in error object');
}
return ' ' + attr + '="'+valueObject[attr]+'"';
}
This failed on valid input for me recently. The error
object that the calling function was passing in had these values:
error: Object
column: 0
line: 262
message: "Identifier 'init_genrand' is not in camel case."
severity: "warning"
source: "jshint.W106"
This function threw an error 'No property column in error object'. This got swallowed by the higher level functions in grunt-contrib-jshint and grunt itself, alas, and was not obvious. I had to trace into his with Node Inspector to find the error.
A pull request is forthcoming to address this.
Even though I'm specifying the source files to run through JSHint using absolute paths, the XML report file uses relative paths. And worse, they're relative to where those reports are stored (build/logs
) instead of to the project root (where grunt is run).
Obviously this must be working for other people. Do I need to change something in the Jenkins project configuration?
Side note: the documentation mentions a JSHint Jenkins plugin which I cannot find, and it links to the Checkstyle plugin. Are these typos, or is there a secret JSHint plugin for Jenkins? :)
This reporter will add colors to your JSHint Trend reports in Jenkins, produced by JSHint Report Plugin.
The closest plugin I can find is one that runs JSLint itself, bypassing Grunt. Is this related?
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.