cozy-labs/cozy-desktop

View on GitHub
gui/js/network/index.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function setupProxy has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const setupProxy = async (
  electronApp /*: App */,
  networkConfig /*: Object */,
  session /*: Session */
) => {
Severity: Major
Found in gui/js/network/index.js - About 2 hrs to fix

    Function networkConfig has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const networkConfig = (argv /*: Array<*> */ = process.argv) => {
      const networkConfig = yargs
        .env('COZY_DRIVE')
        .conflicts('proxy-script', 'proxy-rules')
        .option('proxy-script', {
    Severity: Minor
    Found in gui/js/network/index.js - About 1 hr to fix

      Function getSession has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const getSession = (
        session /*: Session */,
        userAgent /*: string */
      ) /*: Session */ => {
        const syncSession = session.fromPartition(SESSION_PARTITION_NAME, {
      Severity: Minor
      Found in gui/js/network/index.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status