src/syntax/NginxSyntax.js
File NginxSyntax.js
has 598 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @license
*
* Copyright 2016- Luke Jones (https://github.com/luke-j)
*
Function proxy
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
proxy() {
const expression = {
expressions: []
};
Function compress
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
compress() {
const expression = {
expressions: []
};
Function fastcgi
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fastcgi() {
const expression = {
expressions: []
};
Function caching
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
caching() {
const expression = {
expressions: []
},
minutesInOneYear = 525600;
Function headers
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
headers() {
const expression = {
expressions: []
};
Function ssl
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ssl() {
const expression = {
expressions: []
};
Function auth
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
auth() {
const expression = {
expressions: []
};
Function headers
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
headers() {
const expression = {
expressions: []
};
- 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"