<commit_before>/*global desc, task, jake, fail, complete */
(function() {
  "use strict";

  desc("Build and test");
  task("default", ["lint", "docs"], function() {
  });

  desc("Lint everything");
  task("lint", [], function() {
    var lint = require("./build/lint/lint_runner.js");
    var files = new jake.FileList();
    files.include("*.js");
    files.include("*/*.js");
    files.exclude("node_modules");
    var options = nodeLintOptions();
    var passed = lint.validateFileList(files.toArray(), options, {});
    if (!passed) fail("Lint failed.");
  });

  desc("Create docs");
  task("docs", [], function() {
    var files = ['app.js'];
    var spawn = require('child_process').spawn,
        doc = spawn('docco', files);

    doc.stdout.on('data', function (data) {
      process.stdout.write(data);
    });
    doc.stderr.on('data', function (data) {
      process.stderr.write(data);
    });
  });

  function nodeLintOptions() {
    return {
      bitwise: true,
      curly: false,
      eqeqeq: true,
      forin: true,
      immed: true,
      latedef: true,
      newcap: true,
      noarg: true,
      noempty: true,
      nonew: true,
      regexp: true,<commit_msg>Add scaffolding for Jake testing<commit_after>/*global desc, task, jake, fail, complete */
(function() {
  "use strict";

  desc("Build");
  task("default", ["lint", "docs", "test"], function() {});

  desc("Lint");
  task("lint", [], function() {
    var lint = require("./build/lint/lint_runner.js");
    var files = new jake.FileList();
    files.include("*.js");
    files.include("*/*.js");
    files.exclude("node_modules");
    var options = nodeLintOptions();
    var passed = lint.validateFileList(files.toArray(), options, {});
    if (!passed) fail("Lint failed.");
  });

  desc("Documentation");
  task("docs", [], function() {
    var files = ['app.js'];
    var spawn = require('child_process').spawn,
        doc = spawn('docco', files);

    doc.stdout.on('data', function (data) {
      process.stdout.write(data);
    });
    doc.stderr.on('data', function (data) {
      process.stderr.write(data);
    });
  });

  desc("Test");
  task("test", [], function() {
    console.log("TODO: testing goes here.");
  });

  function nodeLintOptions() {
    return {
      bitwise: true,
      curly: false,
      eqeqeq: true,
      forin: true,
      immed: true,
      latedef: true,
      newcap: true,
      noarg: true,
      noempty: true,
      nonew: true,
      regexp: true,
{'fraction_non_alphanumeric': 0.1910699919549477, 'fraction_numerical': 0.0, 'mean_word_length': 2.8738317757009346, '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': '2673017', 'n_tokens_mistral': 823, 'n_tokens_neox': 803, 'n_words': 181}