-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathGruntfile.js
123 lines (115 loc) · 2.73 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
'use strict';
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-jslint');
grunt.loadNpmTasks("grunt-vows");
grunt.loadTasks('./tasks');
// Project configuration.
grunt.initConfig({
vows: {
src: [
'test/*.js'
],
options: {
reporter: "spec"
}
},
jslint: {
all: {
src: [
'lib/**/*.js',
'test/**/*.js',
'Gruntfile.js'
],
directives: {
node: true,
todo: true,
indent: 2
}
}
},
cpplint: {
files: [
'test/fixtures/**/*.cc',
'test/fixtures/**/*.cpp'
],
reporter: 'spec',
verbosity: 1,
counting: 'toplevel',
filters: {
// by default, everything is true
'build': {
'class': false,
'deprecated': true,
'endif_comment': false,
'explicit_make_pair': true,
'forward_decl': false,
'header_guard': true,
'include': false,
'include_alpha': true,
'include_order': false,
'include_what_you_use': true,
'namespaces': false,
'printf_format': true,
'storage_class': false
},
'legal': {
'copyright': true
},
'readability': {
'braces': false,
'casting': true,
'check': false,
'constructors': true,
'fn_size': false,
'function': true,
'multiline_comment': false,
'multiline_string': true,
'nolint': false,
'streams': true,
'todo': false,
'utf8': true
},
'runtime': {
'arrays': false,
'casting': true,
'explicit': false,
'int': true,
'init': false,
'invalid_increment': true,
'member_string_references': false,
'memset': true,
'operator': false,
'printf': true,
'printf_format': false,
'references': true,
'rtti': false,
'sizeof': true,
'string': false,
'threadsafe_fn': true,
'virtual': false
},
'whitespace': {
'blank_line': true,
'braces': false,
'comma': true,
'comments': false,
'end_of_line': true,
'ending_newline': false,
'indent': true,
'labels': false,
'line_length': true,
'newline': false,
'operators': true,
'parens': false,
'semicolon': true,
'tab': false,
'todo': true
}
}
}
});
grunt.registerTask('default', 'jslint');
grunt.registerTask('travis', [
'jslint', 'vows'
]);
};