Showing 99 of 99 total issues
Similar blocks of code found in 4 locations. Consider refactoring. Open
yield cli.action(`Setting maintenance window for ${cli.color.addon(db.name)} to ${cli.color.cyan(args.window)}`, co(function * () {
- Read upRead up
Similar blocks of code found in 4 locations. Consider refactoring. Open
yield cli.action(`Destroying link ${cli.color.cyan(args.link)} from ${cli.color.addon(db.name)}`, co(function * () {
- Read upRead up
Similar blocks of code found in 4 locations. Consider refactoring. Open
yield cli.action(`Starting copy of ${cli.color.yellow(source.name)} to ${cli.color.yellow(target.name)}`, co(function * () {
- Read upRead up
Similar blocks of code found in 4 locations. Consider refactoring. Open
yield cli.action(`Adding link from ${cli.color.addon(target.name)} to ${cli.color.addon(db.name)}`, co(function * () {
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
cli.log(`${name.replace(/_/g, '-')} is set to ${setting.value} for ${db.name}.`)
- Read upRead up
Avoid too many return
statements within this function. Open
if (backup.started_at) return 'Running'
Avoid too many return
statements within this function. Open
return 'Pending'
Similar blocks of code found in 2 locations. Consider refactoring. Open
cli.log(`${name.replace(/_/g, '-')} has been set to ${setting.value} for ${db.name}.`)
- Read upRead up
Avoid too many return
statements within this function. Open
return 'Pending'
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (!backup.succeeded) throw new Error(`Backup ${cli.color.cyan(backupName)} for ${cli.color.app(backupApp)} did not complete successfully`)
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (!backup) throw new Error(`Backup ${cli.color.cyan(backupName)} not found for ${cli.color.app(backupApp)}`)
- Read upRead up
Function run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function * run (context, heroku) { const pgbackups = require('../../lib/pgbackups')(context, heroku) const host = require('../../lib/host')() const {sortBy} = require('lodash')
- Read upRead up
Function status
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function status (backup) { if (backup.succeeded) { if (backup.warnings > 0) return `Finished with ${backup.warnings} warnings` else return 'Completed' }
- Read upRead up
Function run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function * run (context, heroku) { const fetcher = require('../lib/fetcher')(heroku) const {app, args, flags} = context
- Read upRead up
Function parseURL
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function parseURL (db) { const url = require('url') db = url.parse(db.match(/:\/\//) ? db : `postgres:///${db}`) let [user, password] = db.auth ? db.auth.split(':') : [] db.user = user
- Read upRead up
Function run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function * run (context, heroku) { const fetcher = require('../lib/fetcher') const {app, args, flags} = context const {database} = args
- Read upRead up
TODO found Open
// TODO: it shouldn't matter if the target has *more* extensions than the source
- Exclude checks
TODO found Open
// TODO defend against side effects, should find altering code & fix
- Exclude checks
TODO found Open
// TODO: util.getConfigVarName is only providing one of config vars of that
- Exclude checks