IHTSDO/component-identifier-service

View on GitHub

Showing 1,102 of 1,102 total issues

Function getFreeRecord has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

function getFreeRecord(scheme, schemeId, systemId, autoSysId, callback){
Severity: Minor
Found in blogic/SchemeIdBulkDataManager.js - About 35 mins to fix

    Function descriptionIdBulkCreation has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    var descriptionIdBulkCreation = function (namespace, partitionId, idsTotal, request, callback) {
    Severity: Minor
    Found in blogic/BulkIdCreation.js - About 35 mins to fix

      Function insertRecords has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      var insertRecords=function(records, scheme, key, autoSysId, callback) {
      Severity: Minor
      Found in blogic/SchemeIdBulkDataManager.js - About 35 mins to fix

        Function getGroupUsers has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        module.exports.getGroupUsers = function getGroupUsers (groupName, callback) {
            crowd.groups.directmembers(groupName, function(err, res) {
                if(err) {
                    callback(err);
                } else {
        Severity: Minor
        Found in blogic/Security.js - About 35 mins to fix

        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 getStats has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        module.exports.getStats = function getStats(username, callback){
            dbInit.getDB(function (err, pdb, model) {
                if (err)
                    throw err;
                else{
        Severity: Minor
        Found in blogic/HomeDataManager.js - About 35 mins to fix

        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 getSchemeIds has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        var getSchemeIds=function (scheme, schemeIdArray, callback) {
        
            schemeIdArray.forEach(function (schemeId) {
                if (schemeId == null || schemeId == "") {
                    callback(throwErrMessage("SchemeId is null."), null);
        Severity: Minor
        Found in blogic/SchemeIdBulkDataManager.js - About 35 mins to fix

        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 getSchemes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        module.exports.getSchemes = function getSchemes(callback){
            dbInit.getDB(function (err, pdb, model) {
                if (err)
                    throw err;
                else{
        Severity: Minor
        Found in blogic/SchemeDataManager.js - About 35 mins to fix

        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 getNamespaces has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        module.exports.getNamespaces = function getNamespaces(callback){
            dbInit.getDB(function (err, pdb, model) {
        
                if (err)
                    throw err;
        Severity: Minor
        Found in blogic/NamespaceDataManager.js - About 35 mins to fix

        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 deprecateSchemeId has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        var deprecateSchemeId=function (scheme, operation, callback){
            getSchemeId(scheme, operation.schemeId,function(err,schemeIdRecord){
        
                if (err) {
                    callback(err, null);
        Severity: Minor
        Found in blogic/SchemeIdDataManager.js - About 35 mins to fix

        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 deprecateSctid has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        var deprecateSctid=function (operation, callback){
            getSctid(operation.sctid,function(err,sctIdRecord){
        
                if (err) {
                    callback(err, null);
        Severity: Minor
        Found in blogic/SCTIdDataManager.js - About 35 mins to fix

        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 publishSchemeId has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        var publishSchemeId=function (scheme, operation, callback){
            getSchemeId(scheme, operation.schemeId,function(err,schemeIdRecord) {
        
                if (err) {
                    callback(err, null);
        Severity: Minor
        Found in blogic/SchemeIdDataManager.js - About 35 mins to fix

        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 releaseSchemeId has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        var releaseSchemeId=function (scheme, operation, callback){
            getSchemeId(scheme, operation.schemeId,function(err,schemeIdRecord){
        
                if (err) {
                    callback(err, null);
        Severity: Minor
        Found in blogic/SchemeIdDataManager.js - About 35 mins to fix

        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 publishSctid has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        var publishSctid=function (operation, callback){
            getSctid(operation.sctid,function(err,sctIdRecord) {
        
                if (err) {
                    callback(err, null);
        Severity: Minor
        Found in blogic/SCTIdDataManager.js - About 35 mins to fix

        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 createPermission has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        module.exports.createPermission = function createPermission(permission, callback){
            dbInit.getDB(function (err, pdb, model) {
                if (err)
                    throw err;
                else{
        Severity: Minor
        Found in blogic/SchemeDataManager.js - About 35 mins to fix

        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 createPermission has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        module.exports.createPermission = function createPermission(permission, callback){
            dbInit.getDB(function (err, pdb, model) {
                if (err)
                    throw err;
                else{
        Severity: Minor
        Found in blogic/NamespaceDataManager.js - About 35 mins to fix

        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 getNextId has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        var getNextId= function (previousId){
            var prefix=previousId.substring(0,previousId.indexOf("-"));
            var hexBase=previousId.substr(previousId.indexOf("-") + 1);
        
            if (hexBase.toUpperCase()>="FFFFF") {
        Severity: Minor
        Found in blogic/SchemeIdGenerator/SnomedID.js - About 35 mins to fix

        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 releaseSctid has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        var releaseSctid=function (operation, callback){
            getSctid(operation.sctid,function(err,sctIdRecord){
        
                if (err) {
                    callback(err, null);
        Severity: Minor
        Found in blogic/SCTIdDataManager.js - About 35 mins to fix

        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

        Avoid too many return statements within this function.
        Open

            return null;
        Severity: Major
        Found in utils/SctIdHelper.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return null;
          Severity: Major
          Found in utils/SctIdHelper.js - About 30 mins to fix

            Function create has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            auxDescription.create=function(sctIdRecord,callback){
            
                db.getDB(function (err,connection)
                {
            
            
            Severity: Minor
            Found in model/auxDescription.js - About 25 mins to fix

            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

            Severity
            Category
            Status
            Source
            Language