RobDWaller/fableau

View on GitHub

Showing 7 of 15 total issues

Function getColumns has 225 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  getColumns () {
    return [{
      id: 'page_id',
      alias: 'Page ID',
      dataType: this.tableauDataTypeObject.int
Severity: Major
Found in src/js/tableau/columns/page-metric-columns.js - About 1 day to fix

    Function getColumns has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      getColumns () {
        return [{
          id: 'page_id',
          alias: 'Page Id',
          dataType: this.tableauDataTypeObject.int
    Severity: Major
    Found in src/js/tableau/columns/post-metric-columns.js - About 2 hrs to fix

      Function onload has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      window.onload = function () {
        /**
         * Load Facebook
         */
        window.fbAsyncInit = function () {
      Severity: Minor
      Found in src/js/init.js - About 1 hr to fix

        Function getData has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          getData (tableauConnector) {
            tableauConnector.getData = (table, doneCallback) => {
              let facebook = new FacebookRequests(new FacebookData(new Ajax()))
        
              let facebookLoop = new FacebookPageLoop(facebook)
        Severity: Minor
        Found in src/js/tableau/builder.js - About 1 hr to fix

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

              tableauConnector.getData = (table, doneCallback) => {
                let facebook = new FacebookRequests(new FacebookData(new Ajax()))
          
                let facebookLoop = new FacebookPageLoop(facebook)
          
          
          Severity: Minor
          Found in src/js/tableau/builder.js - About 1 hr to fix

            Function getData has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

              getData (tableauConnector) {
                tableauConnector.getData = (table, doneCallback) => {
                  let facebook = new FacebookRequests(new FacebookData(new Ajax()))
            
                  let facebookLoop = new FacebookPageLoop(facebook)
            Severity: Minor
            Found in src/js/tableau/builder.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

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

              getData (url) {
                let data = new Promise((resolve, reject) => {
                  /* global XMLHttpRequest */
                  var request = new XMLHttpRequest()
            
            
            Severity: Minor
            Found in src/js/helper/ajax.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

            Severity
            Category
            Status
            Source
            Language