IHTSDO/component-identifier-service

View on GitHub

Showing 1,102 of 1,102 total issues

Function isSchemeAbleUser has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function isSchemeAbleUser(schemeName, user, callback){
    var able = false;
    security.admins.forEach(function(admin){
        if (admin == user)
            able = true;
Severity: Minor
Found in controllers/Sctid.js - About 1 hr to fix

    Function isAbleUser has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function isAbleUser(schemeName, user, callback){
        var able = false;
        security.admins.forEach(function(admin){
            if (admin == user)
                able = true;
    Severity: Minor
    Found in controllers/SchemeId.js - About 1 hr to fix

      Function isSchemeAbleUser has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function isSchemeAbleUser(schemeName, user, callback){
          var able = false;
          security.admins.forEach(function(admin){
              if (admin == user)
                  able = true;
      Severity: Minor
      Found in controllers/SctidBulk.js - About 1 hr to fix

        Function isAbleUser has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function isAbleUser(schemeName, user, callback){
            var able = false;
            security.admins.forEach(function(admin){
                if (admin == user)
                    able = true;
        Severity: Minor
        Found in controllers/SchemeIdBulk.js - About 1 hr to fix

          Function getSctids has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var getSctids=function (sctidArray, callback) {
          
              sctidArray.forEach(function (sctId) {
          
                  if (!sctIdHelper.validSCTId(sctId)) {
          Severity: Minor
          Found in blogic/SCTIdBulkDataManager.js - About 1 hr to fix

            Function registerSchemeId has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var registerSchemeId=function (scheme, operation, callback){
            
                if (!operation.autoSysId) {
                    getSchemeIdBySystemId(scheme, operation.systemId, function (err, schemeId) {
                        if (err) {
            Severity: Minor
            Found in blogic/SchemeIdDataManager.js - About 1 hr to fix

              Function registerSctid has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var registerSctid=function (operation, callback) {
              
                  if (!operation.autoSysId) {
                      getSctidBySystemId(operation.namespace, operation.systemId, function (err, sctid) {
                          if (err) {
              Severity: Minor
              Found in blogic/SCTIdDataManager.js - About 1 hr to fix

                Method callCis has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private List<Long> callCis(String operation, CISBulkRequest request, boolean includeSchemeName) throws CISClientException {
                        String bulkJobId;
                        String jobInfo = operation;
                        try {
                            CISBulkRequestResponse responseBody;
                Severity: Minor
                Found in java-client/src/main/java/org/snomed/cis/client/CISClient.java - About 1 hr to fix

                  Function runner has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var runner = function (){
                      namespaceDm.getNamespaces(function(err, namespaces) {
                          if (err) {
                              console.log("[ERROR] " + (new Date()).getTime() + ": namespace=" + namespace + ", partition=" + partitionId + ". " + err);
                              return;
                  Severity: Minor
                  Found in blogic/BackEndIdRepoService.js - About 1 hr to fix

                    Function getJobRecords has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function getJobRecords(jobId, callback) {
                    
                        bulkJob.findById({id: parseInt(jobId)}, function (err, jobRecord) {
                            if (err) {
                                callback(err, null);
                    Severity: Minor
                    Found in blogic/BulkJobDataManager.js - About 1 hr to fix

                      Function getNamespacesForUser has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      module.exports.getNamespacesForUser = function getNamespacesForUser (req, res, next) {
                          var token = req.swagger.params.token.value;
                          var username = req.swagger.params.username.value;
                          security.authenticate(token, function(err, data) {
                              if (err)
                      Severity: Minor
                      Found in controllers/Namespace.js - About 1 hr to fix

                        Function publishSctids has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        module.exports.publishSctids = function publishSctids (req, res, next) {
                            var token = req.swagger.params.token.value;
                            var publicationData = req.swagger.params.publicationData.value;
                            security.authenticate(token, function(err, data) {
                                if (err) {
                        Severity: Minor
                        Found in controllers/SctidBulk.js - About 1 hr to fix

                          Function registerSctids has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          module.exports.registerSctids = function registerSctids (req, res, next) {
                              var token = req.swagger.params.token.value;
                              var registrationData = req.swagger.params.registrationData.value;
                              security.authenticate(token, function(err, data) {
                                  if (err) {
                          Severity: Minor
                          Found in controllers/SctidBulk.js - About 1 hr to fix

                            Function releaseSctids has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            module.exports.releaseSctids = function releaseSctids (req, res, next) {
                                var token = req.swagger.params.token.value;
                                var releaseData = req.swagger.params.releaseData.value;
                                security.authenticate(token, function(err, data) {
                                    if (err) {
                            Severity: Minor
                            Found in controllers/SctidBulk.js - About 1 hr to fix

                              Function deprecateSctids has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              module.exports.deprecateSctids = function deprecateSctids (req, res, next) {
                                  var token = req.swagger.params.token.value;
                                  var deprecationData = req.swagger.params.deprecationData.value;
                                  security.authenticate(token, function(err, data) {
                                      if (err) {
                              Severity: Minor
                              Found in controllers/SctidBulk.js - About 1 hr to fix

                                Function setAvailableSCTIDRecord2NewStatus has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function setAvailableSCTIDRecord2NewStatus(operation, callback){
                                    Sync(function () {
                                        try {
                                            var query = {
                                                namespace: parseInt(operation.namespace),
                                Severity: Minor
                                Found in blogic/SCTIdBulkDataManager.js - About 1 hr to fix

                                  Function getUsers has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  module.exports.getUsers = function getUsers (req, res, next) {
                                      var token = req.swagger.params.token.value;
                                      security.authenticate(token, function(err, data) {
                                          if (err) {
                                              return next({message: err.message, statusCode: 401});
                                  Severity: Minor
                                  Found in controllers/Login.js - About 1 hr to fix

                                    Function counterMode has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function counterMode(operation, action, callback){
                                    
                                        getNextNumber(operation, function (err, seq) {
                                            if (err) {
                                                callback(err, null);
                                    Severity: Minor
                                    Found in blogic/SCTIdDataManager.js - About 1 hr to fix

                                      Function counterMode has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function counterMode(scheme, operation, action, callback){
                                      
                                          getNextSchemeId(scheme, operation, function (err, newSchemeId) {
                                              if (err) {
                                                  callback(err, null);
                                      Severity: Minor
                                      Found in blogic/SchemeIdDataManager.js - About 1 hr to fix

                                        Function authenticate has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        module.exports.authenticate = function authenticate (token, callback) {
                                            if (authenticationCache[token]) {
                                                var now = Date.now();
                                                var ago = (Date.now() - authenticationCache[token].timestamp);
                                                if (ago < (60000*60)) {
                                        Severity: Minor
                                        Found in blogic/Security.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language