Showing 10 of 28 total issues
Function run
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function * run (context, heroku) {
let orgInfo = yield Utils.orgInfo(context, heroku)
let groupName = context.org || context.team || context.flags.team
let teamInviteFeatureEnabled = false
let isInvitedUser = false
Function run
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function * run (context, heroku) {
let orgInfo = yield Utils.orgInfo(context, heroku)
let groupName = context.org || context.team || context.flags.team
let teamInvites = []
Function run
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function * run (context, heroku) {
let app = context.app
let recipient = context.args.recipient
// App transfers in bulk
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function run
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function * run (context, heroku) {
let app = context.app
let recipient = context.args.recipient
// App transfers in bulk
Function run
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function * run (context, heroku) {
let orgInfo = yield Utils.orgInfo(context, heroku)
let groupName = context.org || context.team || context.flags.team
let teamInvites = []
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function run
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
async function run (context, heroku) {
let appName = context.app
let permissions = context.flags.permissions || context.flags.privileges || ''
let appInfo = await heroku.get(`/apps/${appName}`)
let output = `Adding ${cli.color.cyan(context.args.email)} access to the app ${cli.color.magenta(appName)}`
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function addMemberToOrg
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
let addMemberToOrg = function * (email, role, groupName, heroku, method = 'PUT') {
Function run
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
async function run (context, heroku) {
let appName = context.app
let app = await heroku.get(`/apps/${appName}`)
let isOrgApp = Utils.isOrgApp(app.owner.email)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function run
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function * run (context, heroku) {
let orgInfo = yield Utils.orgInfo(context, heroku)
let groupName = context.org || context.team || context.flags.team
let teamInviteFeatureEnabled = false
let isInvitedUser = false
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function constructor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
constructor (opts) {
this.opts = opts
this.heroku = this.opts.heroku
this.appName = this.opts.appName
this.recipient = this.opts.recipient
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"