cnap-cobre/synapse

View on GitHub
frontend/src/components/TabbedFileBrowser/TabbedFileBrowser.js

Summary

Maintainability
B
5 hrs
Test Coverage

Showing 4 of 4 total issues

Function render has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

render() {
const {
isReady, fileSystems, dispatch, prefix, browserPaths,
} = this.props;
 
 
Severity: Minor
Found in frontend/src/components/TabbedFileBrowser/TabbedFileBrowser.js - About 1 hr to fix

    Function systemUrlResolverAndRedirector has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const systemUrlResolverAndRedirector = (props) => {
    if (props.pathname.indexOf(props.prefix) !== 0) {
    return 0;
    }
     
     
    Severity: Minor
    Found in frontend/src/components/TabbedFileBrowser/TabbedFileBrowser.js - About 1 hr to fix

      Function systemUrlResolverAndRedirector has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

      const systemUrlResolverAndRedirector = (props) => {
      if (props.pathname.indexOf(props.prefix) !== 0) {
      return 0;
      }
       
       
      Severity: Minor
      Found in frontend/src/components/TabbedFileBrowser/TabbedFileBrowser.js - About 25 mins to fix

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      matchesFileSystem = (path) => {
      const { fileSystems } = this.props;
       
      const matches = fileSystems.map(
      sys => path.indexOf(`${sys.provider}/${sys.id}`) !== -1,
      frontend/src/components/TabbedDirectoryBrowser/TabbedDirectoryBrowser.js on lines 29..35

      There are no issues that match your filters.

      Category
      Status