mirror of https://github.com/zulip/zulip.git
check-all: Display actual relative paths
(imported from commit 2c7ed1deb7aadd7b9286d363494437162e8975f6)
This commit is contained in:
parent
3816ca6dfb
commit
277eb66cf6
|
@ -76,6 +76,7 @@ var fs = require('fs');
|
|||
var path = require('path');
|
||||
var JSLINT = require(path.join(__dirname, 'jslint')).JSLINT;
|
||||
|
||||
var cwd = process.cwd();
|
||||
var js_dir = fs.realpathSync(path.join(__dirname, '../../zephyr/static/js'));
|
||||
|
||||
var exit_code = 0;
|
||||
|
@ -84,7 +85,8 @@ fs.readdirSync(js_dir).forEach(function (filename) {
|
|||
if (filename.slice('-3') !== '.js')
|
||||
return;
|
||||
|
||||
var contents = fs.readFileSync(path.join(js_dir, filename), 'utf8');
|
||||
var filepath = path.join(js_dir, filename);
|
||||
var contents = fs.readFileSync(filepath, 'utf8');
|
||||
var messages = [];
|
||||
|
||||
if (!JSLINT(contents, jslint_options)) {
|
||||
|
@ -110,7 +112,7 @@ fs.readdirSync(js_dir).forEach(function (filename) {
|
|||
if (messages.length > 0) {
|
||||
exit_code = 1;
|
||||
|
||||
console.log(filename);
|
||||
console.log(path.relative(cwd, filepath));
|
||||
|
||||
// Something very wacky happens if we do
|
||||
// .forEach(console.log) directly.
|
||||
|
|
Loading…
Reference in New Issue