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 CHANGED
@@ -6,10 +6,10 @@ Quality assurance tool for node/npm projects
6
6
  ![extending](https://img.shields.io/badge/stability-extending-orange.svg)
7
7
  [![npm-version](https://img.shields.io/npm/v/qa-control.svg)](https://npmjs.org/package/qa-control)
8
8
  [![downloads](https://img.shields.io/npm/dm/qa-control.svg)](https://npmjs.org/package/qa-control)
9
- [![build](https://github.com/codenautas/qa-control/workflows/node.js.yml/badge.svg)](https://github.com/codenautas/qa-control/workflows/node.js.yml)
9
+ [![build](https://github.com/codenautas/qa-control/actions/workflows/node.js.yml/badge.svg)](https://github.com/codenautas/qa-control/actions/workflows/node.js.yml)
10
10
  [![coverage](https://img.shields.io/coveralls/codenautas/qa-control/master.svg)](https://coveralls.io/r/codenautas/qa-control)
11
11
  [![climate](https://img.shields.io/codeclimate/github/codenautas/qa-control.svg)](https://codeclimate.com/github/codenautas/qa-control)
12
- [![dependencies](https://img.shields.io/david/codenautas/qa-control.svg)](https://david-dm.org/codenautas/qa-control)
12
+ [![dependencies](https://snyk.io/test/github/codenautas/qa-control/badge.svg)](https://snyk.io/test/github/codenautas/qa-control)
13
13
  [![qa-control](http://codenautas.com/github/codenautas/qa-control.svg)](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:'[![build](https://github.com/xxx/yyy/workflows/node.js.yml/badge.svg)](https://github.com/xxx/yyy/workflows/node.js.yml)',
122
+ md:'[![build](https://github.com/xxx/yyy/actions/workflows/node.js.yml/badge.svg)](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:'[![linux](https://github.com/xxx/yyy/workflows/node.js.yml/badge.svg)](https://github.com/xxx/yyy/workflows/node.js.yml)',
130
+ md:'[![linux](https://github.com/xxx/yyy/actions/workflows/node.js.yml/badge.svg)](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:'[![qa-control](http://codenautas.com/github/xxx/yyy.svg)](http://codenautas.com/github/xxx/yyy)',
167
167
  docDescription: ''
168
+ },
169
+ 'outdated-deps':{
170
+ forbidden:true,
171
+ md:'[![outdated-deps](https://img.shields.io/david/xxx/yyy.svg)](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(readme.indexOf(cucaID) === -1) {
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qa-control",
3
3
  "description": "QA control of things that nobody controls",
4
- "version": "0.6.0",
4
+ "version": "0.6.1",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/qa-control",