ximex/ris-bka

View on GitHub

Showing 19 of 230 total issues

Function OGD_DocumentResponse_Module_Factory has 9026 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var OGD_DocumentResponse_Module_Factory = function () {
  var OGD_DocumentResponse = {
    name: 'OGD_DocumentResponse',
    typeInfos: [{
        localName: 'TArrayOfWebDocumentContentUrl',
Severity: Major
Found in mappings/OGD_DocumentResponse.js - About 1 mo to fix

    Function RISDok_Module_Factory has 8703 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var RISDok_Module_Factory = function () {
      var RISDok = {
        name: 'RISDok',
        typeInfos: [{
            localName: 'Wechsel',
    Severity: Major
    Found in mappings/RISDok.js - About 1 mo to fix

      Function RISJudikaturNutzdaten_Module_Factory has 8652 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var RISJudikaturNutzdaten_Module_Factory = function () {
        var RISJudikaturNutzdaten = {
          name: 'RISJudikaturNutzdaten',
          typeInfos: [{
              localName: 'Thead',
      Severity: Major
      Found in mappings/RISJudikaturNutzdaten.js - About 1 mo to fix

        File OGD_DocumentResponse.js has 9040 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        var OGD_DocumentResponse_Module_Factory = function () {
          var OGD_DocumentResponse = {
            name: 'OGD_DocumentResponse',
            typeInfos: [{
                localName: 'TArrayOfWebDocumentContentUrl',
        Severity: Major
        Found in mappings/OGD_DocumentResponse.js - About 3 wks to fix

          File RISDok.js has 8717 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          var RISDok_Module_Factory = function () {
            var RISDok = {
              name: 'RISDok',
              typeInfos: [{
                  localName: 'Wechsel',
          Severity: Major
          Found in mappings/RISDok.js - About 3 wks to fix

            File RISJudikaturNutzdaten.js has 8666 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            var RISJudikaturNutzdaten_Module_Factory = function () {
              var RISJudikaturNutzdaten = {
                name: 'RISJudikaturNutzdaten',
                typeInfos: [{
                    localName: 'Thead',
            Severity: Major
            Found in mappings/RISJudikaturNutzdaten.js - About 3 wks to fix

              Function SOAP_Envelope_Module_Factory has 171 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var SOAP_Envelope_Module_Factory = function () {
                var SOAP_Envelope = {
                  name: 'SOAP_Envelope',
                  defaultElementNamespaceURI: 'http:\/\/www.w3.org\/2003\/05\/soap-envelope',
                  typeInfos: [{
              Severity: Major
              Found in mappings/SOAP_Envelope.js - About 6 hrs to fix

                Function OGD_Request_Module_Factory has 153 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var OGD_Request_Module_Factory = function () {
                  var OGD_Request = {
                    name: 'OGD_Request',
                    defaultElementNamespaceURI: 'http:\/\/ris.bka.gv.at\/Search\/1.3\/OGD',
                    typeInfos: [{
                Severity: Major
                Found in mappings/OGD_Request.js - About 6 hrs to fix

                  Function OGD_ResponseList_Module_Factory has 145 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var OGD_ResponseList_Module_Factory = function () {
                    var OGD_ResponseList = {
                      name: 'OGD_ResponseList',
                      defaultElementNamespaceURI: 'http:\/\/ris.bka.gv.at\/Search\/1.3\/OGD',
                      typeInfos: [{
                  Severity: Major
                  Found in mappings/OGD_ResponseList.js - About 5 hrs to fix

                    Function OGD_ResponseList_Type_Module_Factory has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var OGD_ResponseList_Type_Module_Factory = function () {
                      var OGD_ResponseList_Type = {
                        name: 'OGD_ResponseList_Type',
                        defaultElementNamespaceURI: 'http:\/\/ris.bka.gv.at\/Search\/1.3\/OGD',
                        typeInfos: [{
                    Severity: Major
                    Found in mappings/OGD_ResponseList_Type.js - About 4 hrs to fix

                      Function mapQuery has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function mapQuery (query) {
                        if (typeof(query) !== 'object') {
                          throw 'searchQuery param missing!';
                        }
                        // INFO: Not necessary. If missing they get a default value.
                      Severity: Major
                      Found in lib/searchDocuments.js - About 2 hrs to fix

                        Function mapQuery has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function mapQuery (query) {
                          if (typeof(query) !== 'object') {
                            throw 'searchQuery param missing!';
                          }
                          // INFO: Not necessary. If missing they get a default value.
                        Severity: Minor
                        Found in lib/searchDocuments.js - About 2 hrs 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 parseDocument has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function parseDocument (ogdDocumentMetadata) {
                          let comeIntoForceDate = ogdDocumentMetadata.inkrafttretedatum.value;
                          let exceptIntoForceDate = ogdDocumentMetadata.ausserkrafttretedatum.value;
                          let signingDate = ogdDocumentMetadata.unterzeichnungsdatum.value;
                          let releaseDate = ogdDocumentMetadata.veroeffentlichungsdatum.value;
                        Severity: Major
                        Found in lib/getDocument.js - About 2 hrs to fix

                          Function parseSearchExpression has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function parseSearchExpression (searchObject) {
                            if (typeof(searchObject) === 'string') {
                              return {
                                TYPE_NAME: 'OGD_Request.TermSearchExpression',
                                value: searchObject
                          Severity: Minor
                          Found in lib/searchDocuments.js - About 1 hr to fix

                            Function exports has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            module.exports = function (query, cbOk, cbFail) {
                            
                              SOAPRequest(function (PARAMS) {
                                let jsonQuery = mapQuery(query);
                            
                            
                            Severity: Minor
                            Found in lib/searchDocuments.js - About 1 hr to fix

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

                              module.exports = function (error, response, body, callback) {
                                let err = null;
                                let soapBody = null;
                                let raw = {
                                  error: error,
                              Severity: Minor
                              Found in lib/SOAPResponse.js - About 1 hr to fix

                                Function exports has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                module.exports = function (docId, cbOk, cbFail) {
                                
                                  SOAPRequest(function (PARAMS) {
                                    let action = '<getDocument xmlns="http://ogd.bka.gv.at/"><application>' + PARAMS.APPLICATION + '</application>' +
                                      '<docId>' + docId + '</docId></getDocument>';
                                Severity: Minor
                                Found in lib/getDocument.js - About 1 hr to fix

                                  Function exports has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  module.exports = function (error, response, body, callback) {
                                    let err = null;
                                    let soapBody = null;
                                    let raw = {
                                      error: error,
                                  Severity: Minor
                                  Found in lib/SOAPResponse.js - About 55 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 parseSearchExpression has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function parseSearchExpression (searchObject) {
                                    if (typeof(searchObject) === 'string') {
                                      return {
                                        TYPE_NAME: 'OGD_Request.TermSearchExpression',
                                        value: searchObject
                                  Severity: Minor
                                  Found in lib/searchDocuments.js - About 45 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