Showing 10 of 28 total issues
Function setVariableLua
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setVariableLua(options) {
let lua = ['local result'];
if (options.valueSource === 'EXPRESSION') {
Function process
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
process() {
let expires = this.expires();
let lua = this.switchByVal({
Function process
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
process() {
let result = '\n' + this.pad(this.depth) + '-- ' + this.name + ' rule ####';
let criteriaNames = this.criteriaNames(this.criteria) ? this.criteriaNames(this.criteria) : 'none';
result += '\n' + this.pad(this.depth) + '-- criteria: ' + criteriaNames;
Function processHeaderOptions
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
processHeaderOptions(luaMapName, comment, capture) {
let headerName = this.switchByVal({
'MODIFY': this.getHeaderName('standardModifyHeaderName'),
'ADD': this.getHeaderName('standardAddHeaderName'),
'REMOVE': this.getHeaderName('standardRemoveHeaderName'),
Function constructor
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(options, valueMap) {
super();
this.options = options;
this.valueMap = valueMap;
Function process
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
process(usePattern, valueSuffix) {
if (['EXISTS', 'IS_NOT_EMPTY', 'DOES_NOT_EXIST', 'IS_EMPTY'].includes(this.options.matchOperator)) {
return this.checkVar + this.matchOperatorCompare() + 'nil' +
Function setApiConfig
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function setApiConfig(edgegrid, contractId, groupId, propertyId, propertyVersion, outputFile) {
Function papiChoice
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
async function papiChoice(message, papiUrl, containerField, valueField, nameField) {
Function constructor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
constructor(options, valueMap) {
super();
this.options = options;
this.valueMap = valueMap;
- 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 process
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
process() {
let result = '\n' + this.pad(this.depth) + '-- ' + this.name + ' rule ####';
let criteriaNames = this.criteriaNames(this.criteria) ? this.criteriaNames(this.criteria) : 'none';
result += '\n' + this.pad(this.depth) + '-- criteria: ' + criteriaNames;
- 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"