Showing 4 of 111 total issues
Function determineInputSchema
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private determineInputSchema(schemaPath: string | undefined): string {
const bundleDefined = has(this.project.config, 'extensions.prepare-bundle.output')
const oldBundleDefined = has(this.project.config, 'extensions.bundle.output')
// schemaPath is only set when bundle ran
if (!schemaPath) {
- Read upRead up
- Create a ticketCreate a ticket
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 determineBindingOutputPath
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private determineBindingOutputPath(extension: string) {
let outputPath: string
if (this.argv.output) {
outputPath = path.join(this.argv.output, `${this.projectName}.${extension}`)
} else if (has(this.project.config, `extensions.binding.output`)) {
- Read upRead up
- Create a ticketCreate a ticket
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 getProjectConfig
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private getProjectConfig(): { [name: string]: GraphQLProjectConfig } {
let projects: { [name: string]: GraphQLProjectConfig } | undefined
if (this.argv.project) {
if (Array.isArray(this.argv.project)) {
projects = {}
- Read upRead up
- Create a ticketCreate a ticket
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 determineBundleOutputPath
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private determineBundleOutputPath() {
let outputPath: string
if (this.argv.output) {
outputPath = path.join(this.argv.output, `${this.projectName}.graphql`)
} else if (has(this.project.config, `extensions.bundle`)) {
- Read upRead up
- Create a ticketCreate a ticket
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"