Skip to content

Commit e73902e

Browse files
authored
Add sonar badges in README.md (#84)
* Replace istanbul by nyc * Add sonar badges * Update eslint dependencies, replace istanbul by nyc, update npm start and cover
1 parent f41f310 commit e73902e

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ coverage
33
docs
44
.idea/
55
package-lock.json
6+
.nyc_output

.jshintignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
coverage/
22
node_modules/
33
docs/
4+
.nyc_output/

README.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
Node Cache Manager store for Redis
22
==================================
33

4-
[![Codacy Badge](https://api.codacy.com/project/badge/grade/3d5933f95c88472d9075dc302c8d62e1)](https://www.codacy.com/app/dialonce-jkernech/node-cache-manager-redis) [![Codacy Badge](https://api.codacy.com/project/badge/coverage/3d5933f95c88472d9075dc302c8d62e1)](https://www.codacy.com/app/dialonce-jkernech/node-cache-manager-redis) [![Dependency Status](https://david-dm.org/dial-once/node-cache-manager-redis.svg)](https://david-dm.org/dial-once/node-cache-manager-redis)
4+
(https://david-dm.org/dial-once/node-cache-manager-redis.svg)](https://david-dm.org/dial-once/node-cache-manager-redis)
5+
[![Sonar](http://proxy.dialonce.net/sonar/api/badges/gate?key=node-cache-manager-redis)](http://sonar.dialonce.net/dashboard?id=node-cache-manager-redis)
6+
[![Sonar](http://proxy.dialonce.net/sonar/api/badges/measure?key=node-cache-manager-redis&metric=ncloc)](http://sonar.dialonce.net/dashboard?id=node-cache-manager-redis)
7+
[![Sonar](http://proxy.dialonce.net/sonar/api/badges/measure?key=node-cache-manager-redis&metric=coverage)](http://sonar.dialonce.net/dashboard?id=node-cache-manager-redis)
8+
[![Sonar](http://proxy.dialonce.net/sonar/api/badges/measure?key=node-cache-manager-redis&metric=code_smells)](http://proxy.dialonce.net/sonar/api/badges/measure?key=node-cache-manager-redis&metric=coverage)
9+
[![Sonar](http://proxy.dialonce.net/sonar/api/badges/measure?key=node-cache-manager-redis&metric=bugs)](http://sonar.dialonce.net/dashboard?id=node-cache-manager-redis)
10+
[![Sonar](http://proxy.dialonce.net/sonar/api/badges/measure?key=node-cache-manager-redis&metric=sqale_debt_ratio)](http://sonar.dialonce.net/dashboard?id=node-cache-manager-redis)
511

612
The Redis store for the [node-cache-manager](https://github.com/BryanDonovan/node-cache-manager) module.
713

@@ -99,11 +105,11 @@ redisCache.set('foo', 'bar', function () {
99105
redisCache.keys('fo*', function (err, arrayOfKeys) {
100106
// arrayOfKeys: ['foo']
101107
});
102-
108+
103109
redisCache.keys(function (err, arrayOfKeys) {
104110
// arrayOfKeys: ['foo', 'far']
105111
});
106-
112+
107113
redisCache.keys('fa*', { scanCount: 10 }, function (err, arrayOfKeys) {
108114
// arrayOfKeys: ['far']
109115
});
@@ -200,9 +206,9 @@ redisCache.set('foo', 'bar', { compress: false }, function(err) {
200206
});
201207
});
202208

203-
// Setting the compress option to true will enable a default configuration
204-
// for best speed using gzip. For advanced use, a configuration object may
205-
// also be passed with implementation-specific parameters. Currently, only
209+
// Setting the compress option to true will enable a default configuration
210+
// for best speed using gzip. For advanced use, a configuration object may
211+
// also be passed with implementation-specific parameters. Currently, only
206212
// the built-in zlib/gzip implementation is supported.
207213
var zlib = require('zlib');
208214
var redisCache = cacheManager.caching({
@@ -216,7 +222,7 @@ var redisCache = cacheManager.caching({
216222
type: 'gzip',
217223
params: {
218224
level: zlib.Z_BEST_COMPRESSION
219-
}
225+
}
220226
}
221227
});
222228
```

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "node_modules/.bin/mocha --recursive test --exit",
8-
"coverage": "node_modules/.bin/istanbul cover _mocha -- test --recursive --exit",
8+
"cover": "CONSOLE_LOGGING=false ./node_modules/.bin/nyc --reporter=lcov ./node_modules/.bin/_mocha test --recursive --timeout=10000 --exit",
99
"lint": "npm bin jshint .",
1010
"jsdoc": "node_modules/.bin/jsdoc . --package package.json --readme README.md --template node_modules/minami --destination docs"
1111
},
@@ -27,11 +27,11 @@
2727
"sol-redis-pool": "^0.3.2"
2828
},
2929
"devDependencies": {
30-
"istanbul": "^0.4.0",
30+
"mocha": "^5.2.0",
31+
"nyc": "^12.0.2",
3132
"jsdoc": "^3.3.3",
3233
"jshint": "^2.8.0",
3334
"minami": "^1.1.1",
34-
"mocha": "^5.2.0",
3535
"sinon": "^1.17.2"
3636
}
3737
}

0 commit comments

Comments
 (0)