Showing 109 of 391 total issues
Function 1
has a Cognitive Complexity of 109 (exceeds 5 allowed). Consider refactoring. Open
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
/*
* classList.js: Cross-browser full element.classList implementation.
- 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
File _accordions.js
has 572 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
/*
* classList.js: Cross-browser full element.classList implementation.
Function 1
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
/*
* classList.js: Cross-browser full element.classList implementation.
Function 4
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
},{}],4:[function(require,module,exports){
/*
object-assign
(c) Sindre Sorhus
@license MIT
- 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
File MacaroonBakery.java
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Confirmed
package gov.cms.dpc.macaroons;
import com.codahale.xsalsa20poly1305.SecretBox;
import com.github.nitram509.jmacaroons.*;
import gov.cms.dpc.macaroons.exceptions.BakeryException;
Function 5
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
},{}],5:[function(require,module,exports){
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
- 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
File SmokeTest.java
has 288 lines of code (exceeds 250 allowed). Consider refactoring. Open
package gov.cms.dpc.testing.smoketests;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
Function exports
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(api) {
var validEnv = ['development', 'test', 'production']
var currentEnv = api.env()
var isDevelopmentEnv = api.env('development')
var isProductionEnv = api.env('production')
Function 3
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
},{}],3:[function(require,module,exports){
'use strict';
// element-closest | CC0-1.0 | github.com/jonathantneal/closest
- 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
File DistributedBatchQueue.java
has 274 lines of code (exceeds 250 allowed). Consider refactoring. Open
package gov.cms.dpc.queue;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Timer;
import gov.cms.dpc.common.hibernate.queue.DPCQueueManagedSessionFactory;
Function 4
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],4:[function(require,module,exports){
/*
object-assign
(c) Sindre Sorhus
@license MIT
Function 9
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"../compose":6,"../delegate":7}],9:[function(require,module,exports){
'use strict';
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
File JobBatchProcessor.java
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
package gov.cms.dpc.aggregation.engine;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
import com.codahale.metrics.Meter;
Function 5
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],5:[function(require,module,exports){
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
Function importResponseFile
has 78 lines of code (exceeds 50 allowed). Consider refactoring. Open
func importResponseFile(bucket string, file string) (int, int, string, error) {
log.Infof("Importing opt out file: %s (bucket: %s)", file, bucket)
metadata, err := ParseMetadata(bucket, file)
if err != nil {
log.Warningf("Failed to parse opt out file metadata: %s", err)
Method processJobBatchPartial
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public List<JobQueueBatchFile> processJobBatchPartial(UUID aggregatorID, IJobQueue queue, JobQueueBatch job, String mbi) {
StopWatch stopWatch = StopWatch.createStarted();
Optional<OutcomeReason> failReason = Optional.empty();
Optional<Flowable<Resource>> flowable = Optional.empty();
Method processJobBatchPartial
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public List<JobQueueBatchFile> processJobBatchPartial(UUID aggregatorID, IJobQueue queue, JobQueueBatch job, String mbi) {
StopWatch stopWatch = StopWatch.createStarted();
Optional<OutcomeReason> failReason = Optional.empty();
Optional<Flowable<Resource>> flowable = Optional.empty();
- 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
Consider simplifying this complex logical expression. Open
if (!("classList" in document.createElement("_")) || document.createElementNS && !("classList" in document.createElementNS("http://www.w3.org/2000/svg", "g"))) {
(function (view) {
"use strict";
Method API.RunGroupTests
has 66 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (api *API) RunGroupTests() {
const endpoint = "Group"
// Create organization (and delete at the end) and setup accesstoken
auth := api.SetUpOrgAuth()
Method fromFHIR
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Confirmed
@Override
public OrganizationEntity fromFHIR(FHIREntityConverter converter, Organization resource) {
final OrganizationEntity entity = new OrganizationEntity();
// Add the profile metadata