<commit_before>/*!
 * @author:    Divio AG
 * @copyright: http://www.divio.ch
 */

'use strict';

// #############################################################################
// #IMPORTS#
var browserSync = require('browser-sync');
var cache = require('gulp-cached');
var gulp = require('gulp');
var gutil = require('gulp-util');
var imagemin = require('gulp-imagemin');
var jshint = require('gulp-jshint');
var jscs = require('gulp-jscs');
var karma = require('karma').server;
var protractor = require('gulp-protractor').protractor;
var scsslint = require('gulp-scss-lint');
var webdriverUpdate = require('gulp-protractor').webdriver_update;
var yuidoc = require('gulp-yuidoc');

// #############################################################################
// #SETTINGS#
var PROJECT_ROOT = __dirname;
var PROJECT_PATH = {
    'css': PROJECT_ROOT + '/static/css/',
    'docs': PROJECT_ROOT + '/static/docs',
    'html': PROJECT_ROOT + '/templates/',
    'images': PROJECT_ROOT + '/static/img/',
    'js': PROJECT_ROOT + '/static/js/',
    'sass': PROJECT_ROOT + '/private/sass/',
    'tests': PROJECT_ROOT + '/tests'
};

var PROJECT_PATTERNS = {
    'images': [
        PROJECT_PATH.images + '*',
        PROJECT_PATH.images + '**/*',
        '!' + PROJECT_PATH.images + 'dummy/*/**'
    ],
    'js': [
        PROJECT_PATH.js + '*.js',
        PROJECT_PATH.js + '**/*.js',
        PROJECT_PATH.tests + '*.js',
        '!' + PROJECT_PATH.js + '*.min.js',
        '!' + PROJECT_PATH.js + '**/*.min.js'
    ],
    'sass': [
        PROJECT_PATH.sass + '*',
        PROJECT_PATH.sass + '**/*',
        '!' + PROJECT_PATH.sass + 'libs/*',
        '!' + PROJECT_PATH.sass + 'settings/*',
        '!' + PROJECT_PATH.sass + 'layout/_print.{scss,sass}'
    ]
};
PROJECT_PATTERNS.jshint = PROJECT_PATTERNS.js.concat(
    ['!' + PROJECT_PATH.js + 'libs/*.js', './gulpfile.js']
);

var PORT = parseInt(process.env.PORT, 10) || 8000;

// #############################################################################
// #LINTING#
gulp.task('lint', ['lint:javascript', 'lint:sass']);

gulp.task('lint:javascript', function () {
    // DOCS: http://jshint.com/docs/
    gulp.src(PROJECT_PATTERNS.jshint)
        .pipe(jshint())
        .pipe(jscs())
        .on('error', function (error) {
            gutil.log('\n' + error.message);
        })
        .pipe(jshint.reporter('jshint-stylish'));
});

gulp.task('lint:sass', function () {
    // DOCS: https://github.com/brigade/scss-lint/
    gulp.src(PROJECT_PATTERNS.sass)
        .pipe(cache('scsslint'))
        .pipe(scsslint({
            'config': './scss-lint.json'
        }));
});

// #######################################
// #PREPROCESSING#
gulp.task('preprocess', ['images', 'docs']);<commit_msg>fix linting not triggering an error on travis<commit_after>/*!
 * @author:    Divio AG
 * @copyright: http://www.divio.ch
 */

'use strict';

// #############################################################################
// #IMPORTS#
var browserSync = require('browser-sync');
var cache = require('gulp-cached');
var gulp = require('gulp');
var gutil = require('gulp-util');
var imagemin = require('gulp-imagemin');
var jshint = require('gulp-jshint');
var jscs = require('gulp-jscs');
var karma = require('karma').server;
var protractor = require('gulp-protractor').protractor;
var scsslint = require('gulp-scss-lint');
var webdriverUpdate = require('gulp-protractor').webdriver_update;
var yuidoc = require('gulp-yuidoc');

// #############################################################################
// #SETTINGS#
var PROJECT_ROOT = __dirname;
var PROJECT_PATH = {
    'css': PROJECT_ROOT + '/static/css/',
    'docs': PROJECT_ROOT + '/static/docs',
    'html': PROJECT_ROOT + '/templates/',
    'images': PROJECT_ROOT + '/static/img/',
    'js': PROJECT_ROOT + '/static/js/',
    'sass': PROJECT_ROOT + '/private/sass/',
    'tests': PROJECT_ROOT + '/tests'
};

var PROJECT_PATTERNS = {
    'images': [
        PROJECT_PATH.images + '*',
        PROJECT_PATH.images + '**/*',
        '!' + PROJECT_PATH.images + 'dummy/*/**'
    ],
    'js': [
        PROJECT_PATH.js + '*.js',
        PROJECT_PATH.js + '**/*.js',
        PROJECT_PATH.tests + '*.js',
        '!' + PROJECT_PATH.js + '*.min.js',
        '!' + PROJECT_PATH.js + '**/*.min.js'
    ],
    'sass': [
        PROJECT_PATH.sass + '*',
        PROJECT_PATH.sass + '**/*',
        '!' + PROJECT_PATH.sass + 'libs/*',
        '!' + PROJECT_PATH.sass + 'settings/*',
        '!' + PROJECT_PATH.sass + 'layout/_print.{scss,sass}'
    ]
};
PROJECT_PATTERNS.jshint = PROJECT_PATTERNS.js.concat(
    ['!' + PROJECT_PATH.js + 'libs/*.js', './gulpfile.js']
);

var PORT = parseInt(process.env.PORT, 10) || 8000;

// #############################################################################
// #LINTING#
gulp.task('lint', ['lint:javascript', 'lint:sass']);

gulp.task('lint:javascript', function () {
    // DOCS: http://jshint.com/docs/
    return gulp.src(PROJECT_PATTERNS.jshint)
        .pipe(jshint())
        .pipe(jscs())
        .on('error', function (error) {
            gutil.log('\n' + error.message);
        })
        .pipe(jshint.reporter('jshint-stylish'));
});

gulp.task('lint:sass', function () {
    // DOCS: https://github.com/brigade/scss-lint/
    return gulp.src(PROJECT_PATTERNS.sass)
        .pipe(cache('scsslint'))
        .pipe(scsslint({
            'config': './scss-lint.json'
        }));
});

// #######################################
// #PREPROCESSING#
gulp.task('preprocess', ['images', 'docs']);
{'fraction_non_alphanumeric': 0.289009009009009, 'fraction_numerical': 0.002162162162162162, 'mean_word_length': 3.27, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '4385011', 'n_tokens_mistral': 1960, 'n_tokens_neox': 1910, 'n_words': 286}