<commit_before>'use strict';

// use just like fs
var fs = require('graceful-fs'),
    gutil = require('gulp-util'),
    clitable = require('cli-table');

module.exports = function(gulp) {

    var gulpfileCode = fs.readFileSync('gulpfile.js').toString(),
        table = new clitable({
            head: ['Task name', 'Description', 'Dependencies'],
            chars: {
                'top': '' , 'top-mid': '' , 'top-left': '' , 'top-right': '',
                'bottom': '' , 'bottom-mid': '' , 'bottom-left': '' , 'bottom-right': '',
                'left': '' , 'left-mid': '' , 'mid': '' , 'mid-mid': '',
                'right': '' , 'right-mid': '' , 'middle': ' '
            }
        }),
        taskName,
        start,
        end,
        comment,
        deps,
        alt,
        colors = [gutil.colors.bgBlack, gutil.colors.bgWhite];


    for (taskName in gulp.tasks) {
        if (gulp.tasks.hasOwnProperty(taskName)) {
            start = gulpfileCode.lastIndexOf("//", gulpfileCode.indexOf(gulp.tasks[taskName].fn.toString()));
            end = gulpfileCode.indexOf('\n', start);
            if (start !== -1 && end !== -1) {
                start += 2;
                comment = gulpfileCode.substring(start, end);
            } else {
                comment = "";
            }
            deps = gulp.tasks[taskName].dep.join(", ");

            table.push([taskName, comment, deps]);
        }
    }

    console.log(table.toString());

};<commit_msg>'task-list' added to gulp automatically<commit_after>'use strict';

// use just like fs
var fs = require('graceful-fs'),
    gutil = require('gulp-util'),
    clitable = require('cli-table');

module.exports = function(gulp) {
    gulp.task('task-list', function() {
        var gulpfileCode = fs.readFileSync('gulpfile.js').toString(),
            table = new clitable({
                head: ['Task name', 'Description', 'Dependencies'],
                chars: {
                    'top': '' , 'top-mid': '' , 'top-left': '' , 'top-right': '',
                    'bottom': '' , 'bottom-mid': '' , 'bottom-left': '' , 'bottom-right': '',
                    'left': '' , 'left-mid': '' , 'mid': '' , 'mid-mid': '',
                    'right': '' , 'right-mid': '' , 'middle': ' '
                }
            }),
            taskName,
            start,
            end,
            comment,
            deps;


        for (taskName in gulp.tasks) {
            if (gulp.tasks.hasOwnProperty(taskName)) {
                start = gulpfileCode.lastIndexOf("//", gulpfileCode.indexOf(gulp.tasks[taskName].fn.toString()));
                end = gulpfileCode.indexOf('\n', start);
                if (start !== -1 && end !== -1) {
                    start += 2;
                    comment = gulpfileCode.substring(start, end);
                } else {
                    comment = "";
                }
                deps = gulp.tasks[taskName].dep.join(", ");

                table.push([taskName, comment, deps]);
            }
        }

        console.log(table.toString());
    });
};
{'fraction_non_alphanumeric': 0.18291098115659518, 'fraction_numerical': 0.001949317738791423, 'mean_word_length': 1.607112616426757, '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': '7495523', 'n_tokens_mistral': 925, 'n_tokens_neox': 891, 'n_words': 164}