<commit_before>// Copyright (c) 2013, Google Inc. Please see the AUTHORS file for details.
// All rights reserved. Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

import 'dart:convert';
import 'dart:io';

import 'package:grinder/grinder.dart';
import 'package:intl/intl.dart';

final NumberFormat _NF = new NumberFormat.decimalPattern();

// TODO: make the deploy-test and deploy tasks incremental

final Directory BUILD_DIR = new Directory('build');
final Directory DIST_DIR = new Directory('dist');

void main([List<String> args]) {
  defineTask('setup', taskFunction: setup);

  defineTask('mode-notest', taskFunction: (c) => _changeMode(c, false));
  defineTask('mode-test', taskFunction: (c) => _changeMode(c, true));

  defineTask('compile', taskFunction: compile, depends : ['setup']);
  defineTask('deploy', taskFunction: deploy, depends : ['setup', 'mode-notest']);
  defineTask('deploy-test', taskFunction: deployTest, depends : ['setup', 'mode-test']);

  defineTask('docs', taskFunction : docs, depends : ['setup']);
  defineTask('archive', taskFunction : archive, depends : ['mode-notest', 'compile']);
  defineTask('release', taskFunction : release, depends : ['mode-notest', 'compile']);

  defineTask('clean', taskFunction: clean);

  startGrinder(args);
}

/**
 * Init needed dependencies.
 */
void setup(GrinderContext context) {
  // check to make sure we can locate the SDK
  if (sdkDir == null || sdkDir.path.isEmpty) {<commit_msg>Remove empty path check for sdkDir.<commit_after>// Copyright (c) 2013, Google Inc. Please see the AUTHORS file for details.
// All rights reserved. Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

import 'dart:convert';
import 'dart:io';

import 'package:grinder/grinder.dart';
import 'package:intl/intl.dart';

final NumberFormat _NF = new NumberFormat.decimalPattern();

// TODO: make the deploy-test and deploy tasks incremental

final Directory BUILD_DIR = new Directory('build');
final Directory DIST_DIR = new Directory('dist');

void main([List<String> args]) {
  defineTask('setup', taskFunction: setup);

  defineTask('mode-notest', taskFunction: (c) => _changeMode(c, false));
  defineTask('mode-test', taskFunction: (c) => _changeMode(c, true));

  defineTask('compile', taskFunction: compile, depends : ['setup']);
  defineTask('deploy', taskFunction: deploy, depends : ['setup', 'mode-notest']);
  defineTask('deploy-test', taskFunction: deployTest, depends : ['setup', 'mode-test']);

  defineTask('docs', taskFunction : docs, depends : ['setup']);
  defineTask('archive', taskFunction : archive, depends : ['mode-notest', 'compile']);
  defineTask('release', taskFunction : release, depends : ['mode-notest', 'compile']);

  defineTask('clean', taskFunction: clean);

  startGrinder(args);
}

/**
 * Init needed dependencies.
 */
void setup(GrinderContext context) {
  // check to make sure we can locate the SDK
if (sdkDir == null) {
{'fraction_non_alphanumeric': 0.15121302758391492, 'fraction_numerical': 0.0026586905948820204, 'mean_word_length': 5.310272536687631, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '614602', 'n_tokens_mistral': 903, 'n_tokens_neox': 864, 'n_words': 282}