<commit_before>var gulp = require('gulp');
var gutil = require('gulp-util');
var jshint = require('gulp-jshint');
var config = require('../config');
var reporter = require('jshint-stylish');
var map = require('map-stream');
var path = require('path');
var events = require('events');
var emmitter = new events.EventEmitter();

var notify = require("gulp-notify");

var errorReporter = function(file, cb) {
    return map(function(file, cb) {
        if (!file.jshint.success) {
            file.jshint.results.forEach(function(err) {
                if (err) {
                    var msg = [
                        path.basename(file.path),
                        'Line: ' + err.error.line,
                        'Reason: ' + err.error.reason
                    ];

                    emmitter.emit('error', new Error(msg.join('\n')));
                }
            });

            gutil.beep();
        }
        cb(null, file);

    });
};

gulp.task('lint', function() {
    return gulp.src(config.lint.src)
        .pipe(jshint())
        .pipe(jshint.reporter(reporter))
        .pipe(errorReporter())
        .on('error', notify.onError(function(err) {
            return err.message;
        }));
});
<commit_msg>Revert gulp notify lint display (too distracting).<commit_after>var gulp = require('gulp');
var gutil = require('gulp-util');
var jshint = require('gulp-jshint');
var config = require('../config');
var reporter = require('jshint-stylish');
var map = require('map-stream');

var errorReporter = function(file, cb) {
    return map(function(file, cb) {
        if (!file.jshint.success) {
            gutil.beep();
        }
        cb(null, file);

    });
};

gulp.task('lint', function() {
    return gulp.src(config.lint.src)
        .pipe(jshint())
        .pipe(jshint.reporter(reporter))
        .pipe(errorReporter());
});

{'fraction_non_alphanumeric': 0.1674744211093161, 'fraction_numerical': 0.0, 'mean_word_length': 2.197934595524957, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2084402', 'n_tokens_mistral': 590, 'n_tokens_neox': 580, 'n_words': 110}