<commit_before>module.exports = function(grunt) {

  // Project configuration
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    jshint: {
      options: {
        ignores: ['src/web/bower_components/**/*.js']
      },
      all: [
        'Gruntfile.js',
        'src/**/*.js'
      ]
    },
    wiredep: {
      target: {
        src: [
          './**/*.html'
        ],
        dependencies: true,
        devDependencies: true
      },
      karma: {
        src: ['test/karma.conf.js'],
        fileTypes: {
          js: {
            block: /(([\s\t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi,
            detect: { js: /'(.*\.js)'/gi },
            replace: { js: '\'{{filePath}}\',' }
          }
        }
      }
    },
    'http-server': {
      dev: {
        root: 'src/web',
        port: 5062,
        ext: 'html',
        showDir: true,
        autoIndex: true,
        runInBackground: true
      },
    },
    less: {
      dev: {
        options: {
          paths: ['src/web/styles'],
        },
        files: {
          'src/web/styles/main.css': 'src/web/styles/main.less'
        }
      }
    },
    watch: {
      styles: {
        files: [
          'src/web/styles/*.less',
          'src/web/styles/theme/*.less'
        ],
        tasks: ['less'],
        options: {
          spawn: false
        }
      },
      gotest: {
        files: [
          "src/bonitosrv/**/*.go"
        ],
        tasks: ['gotestonce'],
        options: {
          spawn: false
        }
      }
    },
    karma: {
      dev: {
        configFile: 'test/karma.conf.js',
      },
      once: {
        configFile: 'test/karma.conf.js',
        singleRun: true
      },
      phantom: {
        configFile: 'test/karma.conf.js',
        browsers: ['PhantomJS'],
        singleRun: true
      }
    },
    protractor: {
      dev: {
        options: {
          configFile: 'test/protractor-conf.js'
        }
      }
    },
    shell: {
      gotest: {
        command: 'go test',
        options: {
          execOptions: {
            cwd: 'src/bonitosrv'
          }
        }
      },
      gofmt: {
        command: 'go fmt',
        options: {
          execOptions: {
            cwd: 'src/bonitosrv'
          }
        }
      }
    },
    githooks: {
      all: {
        'pre-commit': 'jshint shell:gofmt test'
      }
    }
  });

  // Load grunt plugins
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-less');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-http-server');
  grunt.loadNpmTasks('grunt-wiredep');
  grunt.loadNpmTasks('grunt-karma');
  grunt.loadNpmTasks('grunt-protractor-runner');
  grunt.loadNpmTasks('grunt-shell');
  grunt.loadNpmTasks('grunt-githooks');

  /** Custom tasks */
  grunt.registerTask('dev', 'Run sever for JS only development', function() {
    var tasks = [
      'jshint',
      'wiredep',
      'less:dev',
      'http-server',
      'watch:styles'
    ];
<commit_msg>Run go vet before committing<commit_after>module.exports = function(grunt) {

  // Project configuration
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    jshint: {
      options: {
        ignores: ['src/web/bower_components/**/*.js']
      },
      all: [
        'Gruntfile.js',
        'src/**/*.js'
      ]
    },
    wiredep: {
      target: {
        src: [
          './**/*.html'
        ],
        dependencies: true,
        devDependencies: true
      },
      karma: {
        src: ['test/karma.conf.js'],
        fileTypes: {
          js: {
            block: /(([\s\t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi,
            detect: { js: /'(.*\.js)'/gi },
            replace: { js: '\'{{filePath}}\',' }
          }
        }
      }
    },
    'http-server': {
      dev: {
        root: 'src/web',
        port: 5062,
        ext: 'html',
        showDir: true,
        autoIndex: true,
        runInBackground: true
      },
    },
    less: {
      dev: {
        options: {
          paths: ['src/web/styles'],
        },
        files: {
          'src/web/styles/main.css': 'src/web/styles/main.less'
        }
      }
    },
    watch: {
      styles: {
        files: [
          'src/web/styles/*.less',
          'src/web/styles/theme/*.less'
        ],
        tasks: ['less'],
        options: {
          spawn: false
        }
      },
      gotest: {
        files: [
          "src/bonitosrv/**/*.go"
        ],
        tasks: ['gotestonce'],
        options: {
          spawn: false
        }
      }
    },
    karma: {
      dev: {
        configFile: 'test/karma.conf.js',
      },
      once: {
        configFile: 'test/karma.conf.js',
        singleRun: true
      },
      phantom: {
        configFile: 'test/karma.conf.js',
        browsers: ['PhantomJS'],
        singleRun: true
      }
    },
    protractor: {
      dev: {
        options: {
          configFile: 'test/protractor-conf.js'
        }
      }
    },
    shell: {
      gotest: {
        command: 'go test',
        options: {
          execOptions: {
            cwd: 'src/bonitosrv'
          }
        }
      },
      gofmt: {
        command: 'go fmt',
        options: {
          execOptions: {
            cwd: 'src/bonitosrv'
          }
        }
      },
      govet: {
        command: 'go vet',
        options: {
          execOptions: {
            cwd: 'src/bonitosrv'
          }
        }
      }
    },
    githooks: {
      all: {
        'pre-commit': 'jshint shell:gofmt shell:govet test'
      }
    }
  });

  // Load grunt plugins
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-less');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-http-server');
  grunt.loadNpmTasks('grunt-wiredep');
  grunt.loadNpmTasks('grunt-karma');
  grunt.loadNpmTasks('grunt-protractor-runner');
  grunt.loadNpmTasks('grunt-shell');
  grunt.loadNpmTasks('grunt-githooks');

  /** Custom tasks */
  grunt.registerTask('dev', 'Run sever for JS only development', function() {
    var tasks = [
      'jshint',
      'wiredep',
      'less:dev',
      'http-server',
      'watch:styles'
    ];

{'fraction_non_alphanumeric': 0.17017515667684396, 'fraction_numerical': 0.0012855535915153463, 'mean_word_length': 1.3984585741811175, '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': '1588587', 'n_tokens_mistral': 2150, 'n_tokens_neox': 2130, 'n_words': 309}