airbnb/caravel

View on GitHub
superset-websocket/src/config.ts

Summary

Maintainability
B
4 hrs
Test Coverage

envVarConfigSetter has 21 functions (exceeds 20 allowed). Consider refactoring.
Open

  const envVarConfigSetter: { [envVar: string]: (val: string) => void } = {
    PORT: val => (config.port = toNumber(val)),
    LOG_LEVEL: val => (config.logLevel = val),
    LOG_TO_FILE: val => (config.logToFile = toBoolean(val)),
    LOG_FILENAME: val => (config.logFilename = val),
Severity: Minor
Found in superset-websocket/src/config.ts - About 2 hrs to fix

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

    function applyEnvOverrides(config: ConfigType): ConfigType {
      const envVarConfigSetter: { [envVar: string]: (val: string) => void } = {
        PORT: val => (config.port = toNumber(val)),
        LOG_LEVEL: val => (config.logLevel = val),
        LOG_TO_FILE: val => (config.logToFile = toBoolean(val)),
    Severity: Minor
    Found in superset-websocket/src/config.ts - About 1 hr to fix

      Function defaultConfig has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function defaultConfig(): ConfigType {
        return {
          port: 8080,
          logLevel: 'info',
          logToFile: false,
      Severity: Minor
      Found in superset-websocket/src/config.ts - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status