jonathan-irvin/jelly-fin

View on GitHub

Showing 99 of 99 total issues

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

const NavigationNonAuth = () => {
  const [anchorEl, setAnchorEl] = React.useState(null);

  const classes = useStyles();

Severity: Minor
Found in src/components/Navigation/index.js - About 1 hr to fix

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

      render() {
        const {
          onlyOneLeft,
          isEnabled,
          signInMethod,
    Severity: Minor
    Found in src/components/Profile/index.js - About 1 hr to fix

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

        render() {
          const { authUser, message, onRemoveMessage } = this.props;
          const { editMode, editText } = this.state;
      
          return (
      Severity: Minor
      Found in src/components/Messages/MessageItem.js - About 1 hr to fix

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

            this.props.firebase.auth.currentUser
              .unlink(providerId)
              .then(this.fetchSignInMethods)
              .catch(error => this.setState({ error }));
        Severity: Major
        Found in src/components/Profile/index.js and 1 other location - About 1 hr to fix
        src/components/Profile/index.js on lines 82..85

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 65.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            this.props.firebase.auth.currentUser
              .linkAndRetrieveDataWithCredential(credential)
              .then(this.fetchSignInMethods)
              .catch(error => this.setState({ error }));
        Severity: Major
        Found in src/components/Profile/index.js and 1 other location - About 1 hr to fix
        src/components/Profile/index.js on lines 89..92

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 65.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

          render() {
            const { text, messages, loading } = this.state;
        
            return (
              <AuthUserContext.Consumer>
        Severity: Minor
        Found in src/components/Messages/Messages.js - About 1 hr to fix

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

            render() {
              const { activeSignInMethods, error } = this.state;
          
              return (
                <div>
          Severity: Minor
          Found in src/components/Profile/index.js - About 1 hr to fix

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

                render() {
                  return (
                    <AuthUserContext.Consumer>
                      {authUser =>
                        needsEmailVerification(authUser) ? (
            Severity: Minor
            Found in src/components/Session/withEmailVerification.js - About 1 hr to fix

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

                render() {
                  const { users, loading } = this.state;
              
                  return (
                    <div>
              Severity: Minor
              Found in src/components/Users/UserList.js - About 1 hr to fix

                Function registerValidSW has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function registerValidSW(swUrl, config) {
                  navigator.serviceWorker
                    .register(swUrl)
                    .then(registration => {
                      registration.onupdatefound = () => {
                Severity: Minor
                Found in src/serviceWorker.js - About 1 hr to fix

                  Function withAuthentication has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const withAuthentication = Component => {
                    class WithAuthentication extends React.Component {
                      constructor(props) {
                        super(props);
                  
                  
                  Severity: Minor
                  Found in src/components/Session/withAuthentication.js - About 1 hr to fix

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

                    const App = () => {
                      const classes = useStyles();
                      return (
                        <Router>
                          <div className={classes.root}>
                    Severity: Minor
                    Found in src/components/App/index.js - About 1 hr to fix

                      Function SignInPage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const SignInPage = () => {
                        const classes = useStyles();
                        return (
                          <Container component="main" maxWidth="xs">
                            <CssBaseline />
                      Severity: Minor
                      Found in src/components/SignIn/index.js - About 1 hr to fix

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

                          accounts.map(account => (
                            <AccountItem
                              authUser={authUser}
                              key={account.uid}
                              account={account}
                        Severity: Major
                        Found in src/components/Accounts/AccountList.js and 1 other location - About 1 hr to fix
                        src/components/Messages/MessageList.js on lines 12..20

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 58.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

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

                            {messages.map(message => (
                              <MessageItem
                                authUser={authUser}
                                key={message.uid}
                                message={message}
                        Severity: Major
                        Found in src/components/Messages/MessageList.js and 1 other location - About 1 hr to fix
                        src/components/Accounts/AccountList.js on lines 11..19

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 58.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Function withAuthorization has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const withAuthorization = condition => Component => {
                          class WithAuthorization extends React.Component {
                            componentDidMount() {
                              this.listener = this.props.firebase.onAuthUserListener(
                                authUser => {
                        Severity: Minor
                        Found in src/components/Session/withAuthorization.js - About 1 hr to fix

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

                            render() {
                              const { user, loading } = this.state;
                          
                              return (
                                <div>
                          Severity: Minor
                          Found in src/components/Users/UserItem.js - About 1 hr to fix

                            Similar blocks of code found in 6 locations. Consider refactoring.
                            Open

                                    <MenuItem onClick={handleClose}>
                                      <Link to={ROUTES.DASHBOARD} className={classes.menuLink}>
                                        Dashboard
                                      </Link>
                                    </MenuItem>
                            Severity: Major
                            Found in src/components/Navigation/index.js and 5 other locations - About 55 mins to fix
                            src/components/Navigation/index.js on lines 81..85
                            src/components/Navigation/index.js on lines 87..91
                            src/components/Navigation/index.js on lines 94..98
                            src/components/Navigation/index.js on lines 139..143
                            src/components/Navigation/index.js on lines 144..148

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 54.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 6 locations. Consider refactoring.
                            Open

                                    <MenuItem onClick={handleClose}>
                                      <Link to={ROUTES.ACCOUNTS} className={classes.menuLink}>
                                        Accounts
                                      </Link>
                                    </MenuItem>
                            Severity: Major
                            Found in src/components/Navigation/index.js and 5 other locations - About 55 mins to fix
                            src/components/Navigation/index.js on lines 76..80
                            src/components/Navigation/index.js on lines 81..85
                            src/components/Navigation/index.js on lines 94..98
                            src/components/Navigation/index.js on lines 139..143
                            src/components/Navigation/index.js on lines 144..148

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 54.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 6 locations. Consider refactoring.
                            Open

                                    <MenuItem onClick={handleClose}>
                                      <Link to={ROUTES.SIGN_IN} className={classes.menuLink}>
                                        Sign In
                                      </Link>
                                    </MenuItem>
                            Severity: Major
                            Found in src/components/Navigation/index.js and 5 other locations - About 55 mins to fix
                            src/components/Navigation/index.js on lines 76..80
                            src/components/Navigation/index.js on lines 81..85
                            src/components/Navigation/index.js on lines 87..91
                            src/components/Navigation/index.js on lines 94..98
                            src/components/Navigation/index.js on lines 139..143

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 54.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Severity
                            Category
                            Status
                            Source
                            Language