Showing 166 of 237 total issues
Function checkPaths
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
checkPaths(jobParamsArray) {
let lineNumber = 2;
for (let params of jobParamsArray) {
for (let filePath of params.files) {
if (!fs.existsSync(filePath)) {
- 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 renderUploadInfo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
renderUploadInfo(data, dartProcess) {
let [detailDiv, progressBar] = this.getDivs(dartProcess, 'uploadInfo');
if (data.action == 'start') {
detailDiv.text(data.msg);
// We can have multiple uploads, so we re-initialize the
- 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 _validateNoExtraneousPayloadFiles
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_validateNoExtraneousPayloadFiles() {
//Context.logger.info(`Validator: Looking for extraneous payload files in ${this.pathToBag}`);
for(var manifest of this.payloadManifests()) {
for (var f of this.payloadFiles()) {
if (!manifest.keyValueCollection.first(f.relDestPath)) {
- 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 findById
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static findById(id) {
for (var pluginType of pluginTypes) {
var modules = PluginManager.getModuleCollection(pluginType);
for (var module of modules) {
if (module.description().id == id) {
- 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 showDivs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
showDivs(job, dartProcess) {
let processDiv = $('#dartProcessContainer');
// If we're in the Jobs section, this is the job_run_controller
// and we need to add some HTML to the page to display job status
- 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 makeList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static makeList(items, selected, includeEmptyFirstOption) {
if (!Array.isArray(selected)) {
// Coerce to array
selected = [selected];
}
- 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"