kalisio/geokoder

View on GitHub

Showing 8 of 8 total issues

Function createKanoProvider has 129 lines of code (exceeds 50 allowed). Consider refactoring.
Open

export async function createKanoProvider (app) {
  const providers = app.get('providers')
  const config = _.get(providers, 'Kano')
  if (!config) { return null }
  const services = config.services || {}
Severity: Major
Found in src/providers/kano.js - About 4 hrs to fix

    Function createKanoProvider has a Cognitive Complexity of 41 (exceeds 20 allowed). Consider refactoring.
    Open

    export async function createKanoProvider (app) {
      const providers = app.get('providers')
      const config = _.get(providers, 'Kano')
      if (!config) { return null }
      const services = config.services || {}
    Severity: Minor
    Found in src/providers/kano.js - About 3 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 createMBTilesProvider has 85 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    export async function createMBTilesProvider (app) {
      const providers = app.get('providers')
      const config = _.get(providers, 'MBTiles')
      if (!config) { return null }
    
    
    Severity: Major
    Found in src/providers/mbtiles.js - About 2 hrs to fix

      Function createMBTilesProvider has a Cognitive Complexity of 27 (exceeds 20 allowed). Consider refactoring.
      Open

      export async function createMBTilesProvider (app) {
        const providers = app.get('providers')
        const config = _.get(providers, 'MBTiles')
        if (!config) { return null }
      
      
      Severity: Minor
      Found in src/providers/mbtiles.js - About 1 hr 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

      FIXME found
      Open

              // FIXME: we assume the same zoom level for all layers
      Severity: Minor
      Found in src/providers/mbtiles.js by fixme

      TODO found
      Open

                  // TODO: score by distance ?
      Severity: Minor
      Found in src/routes.js by fixme

      FIXME found
      Open

              // FIXME might be automated with https://github.com/kalisio/feathers-distributed/issues/125
      Severity: Minor
      Found in src/providers/kano.js by fixme

      TODO found
      Open

                  // TODO: might not be this one
      Severity: Minor
      Found in src/providers/kano.js by fixme
      Severity
      Category
      Status
      Source
      Language