qa-control 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/bin/definition/definition.js +11 -3
- package/bin/qa-control.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,10 +6,10 @@ Quality assurance tool for node/npm projects
|
|
|
6
6
|

|
|
7
7
|
[](https://npmjs.org/package/qa-control)
|
|
8
8
|
[](https://npmjs.org/package/qa-control)
|
|
9
|
-
[](https://github.com/codenautas/qa-control/workflows/node.js.yml)
|
|
9
|
+
[](https://github.com/codenautas/qa-control/actions/workflows/node.js.yml)
|
|
10
10
|
[](https://coveralls.io/r/codenautas/qa-control)
|
|
11
11
|
[](https://codeclimate.com/github/codenautas/qa-control)
|
|
12
|
-
[](https://snyk.io/test/github/codenautas/qa-control)
|
|
13
13
|
[](http://codenautas.com/github/codenautas/qa-control)
|
|
14
14
|
|
|
15
15
|
|
|
@@ -119,7 +119,7 @@ module.exports = function(qaControl){
|
|
|
119
119
|
check: function(packageJson){
|
|
120
120
|
return !packageJson['qa-control']['test-appveyor'];
|
|
121
121
|
},
|
|
122
|
-
md:'[](https://github.com/xxx/yyy/workflows/node.js.yml)',
|
|
122
|
+
md:'[](https://github.com/xxx/yyy/actions/workflows/node.js.yml)',
|
|
123
123
|
imgExample:'https://raw.githubusercontent.com/codenautas/codenautas/master/img/medalla-ejemplo-linux.png',
|
|
124
124
|
docDescription: 'linux/build'
|
|
125
125
|
},
|
|
@@ -127,7 +127,7 @@ module.exports = function(qaControl){
|
|
|
127
127
|
check: function(packageJson){
|
|
128
128
|
return !!packageJson['qa-control']['test-appveyor'];
|
|
129
129
|
},
|
|
130
|
-
md:'[](https://github.com/xxx/yyy/workflows/node.js.yml)',
|
|
130
|
+
md:'[](https://github.com/xxx/yyy/actions/workflows/node.js.yml)',
|
|
131
131
|
imgExample:'https://raw.githubusercontent.com/codenautas/codenautas/master/img/medalla-ejemplo-linux.png',
|
|
132
132
|
hideInManual: true,
|
|
133
133
|
},
|
|
@@ -165,6 +165,10 @@ module.exports = function(qaControl){
|
|
|
165
165
|
mandatory:false,
|
|
166
166
|
md:'[](http://codenautas.com/github/xxx/yyy)',
|
|
167
167
|
docDescription: ''
|
|
168
|
+
},
|
|
169
|
+
'outdated-deps':{
|
|
170
|
+
forbidden:true,
|
|
171
|
+
md:'[](https://david-dm.org/xxx/yyy)'
|
|
168
172
|
}
|
|
169
173
|
},
|
|
170
174
|
customs:{
|
|
@@ -355,7 +359,11 @@ module.exports = function(qaControl){
|
|
|
355
359
|
var cucarda = cucardas[nombreCucarda];
|
|
356
360
|
var cucaID = '!['+/!\[([-a-z]+)]/.exec(cucarda.md)[1]+']';
|
|
357
361
|
var cucaStr = cucarda.md.replace(/\bxxx\b/g,repo).replace(/\byyy\b/g,modulo);
|
|
358
|
-
if(
|
|
362
|
+
if(cucarda.forbidden) {
|
|
363
|
+
if(readme.indexOf(cucaID) !== -1) {
|
|
364
|
+
warns.push({warning:'forbidden_cucarda_1', params:[nombreCucarda], scoring:{cucardas:1}});
|
|
365
|
+
}
|
|
366
|
+
} else if(readme.indexOf(cucaID) === -1) {
|
|
359
367
|
if(cucarda.mandatory) {
|
|
360
368
|
warns.push({warning:'lack_of_mandatory_cucarda_1', params:[nombreCucarda], scoring:{cucardas:1}});
|
|
361
369
|
}
|
package/bin/qa-control.js
CHANGED
|
@@ -41,6 +41,7 @@ qaControl.msgs={
|
|
|
41
41
|
lack_of_cucarda_marker_in_readme:'falta la sección "cucardas" en README.md',
|
|
42
42
|
lack_of_mandatory_cucarda_1: 'falta la cucarda oblicatoria $1',
|
|
43
43
|
wrong_format_in_cucarda_1: 'la cucarda "$1" tiene formato incorrecto',
|
|
44
|
+
forbidden_cucarda_1: 'la cucarda "$1" no debe usarse en README.md',
|
|
44
45
|
lack_of_mandatory_line_1_in_file_2: 'falta la linea obligatoria $1 en el archivo $2',
|
|
45
46
|
file_1_does_not_match_custom_2: '$1 no respeta la custombre $2',
|
|
46
47
|
first_lines_does_not_match_in_file_1: 'las primeras líneas no coinciden en $1',
|
|
@@ -120,6 +121,7 @@ qaControl.generateCucardas = function generateCucardas(cucardas, packageJson) {
|
|
|
120
121
|
/*eslint-disable guard-for-in */
|
|
121
122
|
for(var nombreCucarda in cucardas) {
|
|
122
123
|
var cucarda = cucardas[nombreCucarda];
|
|
124
|
+
if(cucarda.forbidden) { continue; }
|
|
123
125
|
if(!cucarda.check || cucarda.check(packageJson)) {
|
|
124
126
|
var cucaStr = cucarda.md.replace(/\bxxx\b/g,repo).replace(/\byyy\b/g,modulo);
|
|
125
127
|
cucaFileContent += cucaStr +'\n';
|
package/package.json
CHANGED