You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Allow generating an empty report with all validated files
Introduce a new boolean option "includeUnreported" to enable such report.
Recognize a new "input" parameter in the sub-task object with all input
files to include in the rport.
Copy file name to clipboardExpand all lines: README.md
+34-4Lines changed: 34 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,9 +62,18 @@ Type: `Boolean`
62
62
Default: `false`
63
63
64
64
If the `src` property does not point to any files, or if it is missing,
65
-
the task will make the Grunt run fail. If you set the `ignoreMissing`
65
+
the task will make the Grunt run fail. If you set the `ignoreMissing`
66
66
option to `true`, Grunt will continue executing other tasks.
67
67
68
+
#### includeUnreported
69
+
Type: `Boolean`
70
+
Default: `false`
71
+
72
+
If the `src` property does not point to any files, or if it is missing,
73
+
the task will assume, that no messages existed for the input files, which
74
+
which were above the configured severity. It will create the report
75
+
nevertheless and include all input files there.
76
+
68
77
#### targetExtension
69
78
Type: `String`
70
79
Default: ".html:
@@ -73,8 +82,8 @@ If the `dest` property specified only the target directory, the converted report
73
82
74
83
### Task Data
75
84
76
-
The configuration consists of `src` and `dest` property pairs. The `src`
77
-
property has to point to an existing source path. The `dest` property has
85
+
The configuration consists of `src` and `dest` property pairs. The `src`
86
+
property has to point to an existing source path. The `dest` property has
78
87
to point to the path, where the converted report should be written.
79
88
80
89
If you do not end the `dest` path by the path separator (slash, for example), the `dest` path will be considered as if it includes the converted report file name too.
@@ -84,6 +93,21 @@ converted report will be created using the source report name with the HTML expe
84
93
85
94
If you specify more source files or directories, or use wildcards, the target path should be a directory - ended by the path separator (slash, for example).
86
95
96
+
If you set `includeUnreported` to true and you expect all input files reported with zero messages, include the `input` property. Set it to the files, which were input of the `htmllint` task. For example:
97
+
98
+
```js
99
+
'html-html-report-converter': {
100
+
options: {
101
+
includeUnreported:true
102
+
},
103
+
all: {
104
+
input:'snapshots/*.html',
105
+
src:'results/report.json',
106
+
dest:'results/report.html'
107
+
}
108
+
}
109
+
```
110
+
87
111
#### src
88
112
Type: `String` or `Array`
89
113
@@ -94,6 +118,11 @@ Type: `String`
94
118
95
119
Path to the file, which will be the HTML report written to. Or only the path to the directory, where it should be written, if the source report name with the HTML expension shoudl be used.
96
120
121
+
#### input
122
+
Type: `String|Array|Object`
123
+
124
+
Files, which were input of the `htmllint` task. The format is the same as for the `src` parameter - the Grunt source file specification.
125
+
97
126
### Loading
98
127
99
128
Load the plugin in `Gruntfile.js`:
@@ -162,13 +191,14 @@ your code using Grunt.
162
191
163
192
## Release History
164
193
194
+
* 2018-01-27 v0.1.0 Allow generating an empty report with all validated files
165
195
* 2017-11-25 v0.0.3 Fix appending the HTML extension to the target report file
166
196
* 2017-11-25 v0.0.2 Upgrade the reporter dependency to support Node.js < 7
0 commit comments