<commit_before>(function () {
	'use strict';

	/* global require: true */

	var gulp        = require('gulp');
	var runSequence = require('run-sequence');
	var rimraf      = require('gulp-rimraf');
	var concat      = require('gulp-concat');
	var template    = require('gulp-template');
	var uglify      = require('gulp-uglify');
	var rename      = require('gulp-rename');
	var yuidoc      = require('gulp-yuidoc');
	var qunit       = require('gulp-qunit');
	var jshint      = require('gulp-jshint');
	var jscs        = require('gulp-jscs');
	var stylish     = require('gulp-jscs-stylish');

	var packageJson    = require('./package.json');
	var rootFolder     = './';
	var srcFolder      = rootFolder + 'src/';
	var buildFolder    = rootFolder + 'build/';
	var docFolder      = rootFolder + 'doc/';
	var docThemeFolder = rootFolder + 'docthemes';
	var testFolder     = rootFolder + 'tests/';
	var bundleName     = 'tdi-bundle';

	gulp.task('clean', ['cleanBuild', 'cleanDoc']);

	gulp.task('cleanBuild', function () {
		return gulp.src(buildFolder, {read : false})
			.pipe(rimraf());
	});

	gulp.task('cleanDoc', function () {
		return gulp.src(docFolder, {read : false})
			.pipe(rimraf());
	});

	gulp.task('bundle', [], function () {
		var files = [];

		files.push(rootFolder + 'banner.txt');
		files.push(srcFolder + 'js/tdi.js');
		files.push(srcFolder + 'js/tdi-ajax.js');
		files.push(srcFolder + 'js/tdi-tools.js');

		return gulp.src(files)
			.pipe(concat(bundleName + '.js'))
			.pipe(template({
				projectUrl     : packageJson.homepage,
				productVersion : packageJson.version
			}))
			.pipe(gulp.dest(buildFolder));
	});

	gulp.task('minify', function () {
		return gulp.src(buildFolder + bundleName + '.js')
			.pipe(uglify({
				output : {
					comments : /^!/i
				}
			}))
			.pipe(function () {
				return rename(function (path) {
					path.basename = bundleName + '.min';
				});
			}())
			.pipe(gulp.dest(buildFolder));
	});

	gulp.task('release', ['bundle', 'minify'], function () {
		return gulp.src([buildFolder + bundleName + '.js', buildFolder + bundleName + '.min.js'])
			.pipe(function () {
				return rename(function (path) {
					path.basename = path.basename.replace(bundleName, bundleName + '-' + packageJson.version);
				});
			}())
			.pipe(gulp.dest(buildFolder));
	});

	gulp.task('copyDocTheme', function () {
		return gulp.src(docThemeFolder + '/default/**/*')
			.pipe(gulp.dest(docFolder));
	});

	gulp.task('doc', ['cleanDoc', 'copyDocTheme'], function () {
		return gulp.src(srcFolder + "js/*.js")
			.pipe(yuidoc())
			.pipe(gulp.dest(docFolder));
	});

	gulp.task('test', ['prepare'], function () {
		return gulp.src(testFolder + '*.html')
			.pipe(qunit({timeout : 10}));
	});

	gulp.task('prepare', function () {
		runSequence('cleanBuild', 'bundle', 'minify');
	});

	gulp.task('lint', ['jscs'], function () {
		return gulp.src(['./src/**/*.js', './tests/**/*.js'])
			.pipe(jshint())
			.pipe(jshint.reporter('jshint-stylish'));
	});

	gulp.task('jscs', function () {
		return gulp.src(['./src/**/*.js', './tests/**/*-tests.js'])
			.pipe(jscs())
			.pipe(stylish());
	});

	gulp.task('build', ['test']);
	gulp.task('default', ['build']);
}());
<commit_msg>Lint before build<commit_after>(function () {
	'use strict';

	/* global require: true */

	var gulp        = require('gulp');
	var runSequence = require('run-sequence');
	var rimraf      = require('gulp-rimraf');
	var concat      = require('gulp-concat');
	var template    = require('gulp-template');
	var uglify      = require('gulp-uglify');
	var rename      = require('gulp-rename');
	var yuidoc      = require('gulp-yuidoc');
	var qunit       = require('gulp-qunit');
	var jshint      = require('gulp-jshint');
	var jscs        = require('gulp-jscs');
	var stylish     = require('gulp-jscs-stylish');

	var packageJson    = require('./package.json');
	var rootFolder     = './';
	var srcFolder      = rootFolder + 'src/';
	var buildFolder    = rootFolder + 'build/';
	var docFolder      = rootFolder + 'doc/';
	var docThemeFolder = rootFolder + 'docthemes';
	var testFolder     = rootFolder + 'tests/';
	var bundleName     = 'tdi-bundle';

	gulp.task('clean', ['cleanBuild', 'cleanDoc']);

	gulp.task('cleanBuild', function () {
		return gulp.src(buildFolder, {read : false})
			.pipe(rimraf());
	});

	gulp.task('cleanDoc', function () {
		return gulp.src(docFolder, {read : false})
			.pipe(rimraf());
	});

	gulp.task('bundle', [], function () {
		var files = [];

		files.push(rootFolder + 'banner.txt');
		files.push(srcFolder + 'js/tdi.js');
		files.push(srcFolder + 'js/tdi-ajax.js');
		files.push(srcFolder + 'js/tdi-tools.js');

		return gulp.src(files)
			.pipe(concat(bundleName + '.js'))
			.pipe(template({
				projectUrl     : packageJson.homepage,
				productVersion : packageJson.version
			}))
			.pipe(gulp.dest(buildFolder));
	});

	gulp.task('minify', function () {
		return gulp.src(buildFolder + bundleName + '.js')
			.pipe(uglify({
				output : {
					comments : /^!/i
				}
			}))
			.pipe(function () {
				return rename(function (path) {
					path.basename = bundleName + '.min';
				});
			}())
			.pipe(gulp.dest(buildFolder));
	});

	gulp.task('release', ['bundle', 'minify'], function () {
		return gulp.src([buildFolder + bundleName + '.js', buildFolder + bundleName + '.min.js'])
			.pipe(function () {
				return rename(function (path) {
					path.basename = path.basename.replace(bundleName, bundleName + '-' + packageJson.version);
				});
			}())
			.pipe(gulp.dest(buildFolder));
	});

	gulp.task('copyDocTheme', function () {
		return gulp.src(docThemeFolder + '/default/**/*')
			.pipe(gulp.dest(docFolder));
	});

	gulp.task('doc', ['cleanDoc', 'copyDocTheme'], function () {
		return gulp.src(srcFolder + "js/*.js")
			.pipe(yuidoc())
			.pipe(gulp.dest(docFolder));
	});

	gulp.task('test', ['prepare'], function () {
		return gulp.src(testFolder + '*.html')
			.pipe(qunit({timeout : 10}));
	});

	gulp.task('prepare', function () {
		runSequence('cleanBuild', 'bundle', 'minify');
	});

	gulp.task('lint', ['jscs'], function () {
		return gulp.src(['./src/**/*.js', './tests/**/*.js'])
			.pipe(jshint())
			.pipe(jshint.reporter('jshint-stylish'));
	});

	gulp.task('jscs', function () {
		return gulp.src(['./src/**/*.js', './tests/**/*-tests.js'])
			.pipe(jscs())
			.pipe(stylish());
	});

	gulp.task('build', function () {
		runSequence('lint', 'test');
	});
	gulp.task('default', ['build']);
}());

{'fraction_non_alphanumeric': 0.21493737436214627, 'fraction_numerical': 0.0006185248183083346, 'mean_word_length': 3.397008837525493, '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': '3541241', 'n_tokens_mistral': 2536, 'n_tokens_neox': 2300, 'n_words': 392}