hummingbird-me/kitsu-web

View on GitHub

Showing 88 of 872 total issues

Avoid too many return statements within this function.
Open

          return hrefTo(this, 'media-reactions', id, queryParams);
Severity: Major
Found in app/components/application/user-notifications/item.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return '#';
    Severity: Major
    Found in app/components/application/user-notifications/item.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return hrefTo(this, 'comments', id, queryParams);
      Severity: Major
      Found in app/components/application/user-notifications/item.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return '#';
        Severity: Major
        Found in app/components/application/user-notifications/item.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                    return hrefTo(this, 'comments', modelId, queryParams);
          Severity: Major
          Found in app/components/application/user-notifications/item.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return 'fall';
            Severity: Major
            Found in app/components/media/media-information.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return { index: 1, count: chapters };
              Severity: Major
              Found in app/components/stats/time-spent.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return '#';
                Severity: Major
                Found in app/components/application/user-notifications/item.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return '#';
                  Severity: Major
                  Found in app/components/application/user-notifications/item.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                              return hrefTo(this, `${type}.show.${unitType}.show`, get(actor, 'slug'), get(subject, 'number'), queryParams);
                    Severity: Major
                    Found in app/components/application/user-notifications/item.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return '#';
                      Severity: Major
                      Found in app/components/application/user-notifications/item.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return '#';
                        Severity: Major
                        Found in app/components/application/user-notifications/item.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                if ('en_kr' in titleLocales) return 'en_kr';
                          Severity: Major
                          Found in app/utils/get-title-field.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                  return 'en_jp';
                            Severity: Major
                            Found in app/utils/get-title-field.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                    return 'percent-quarter-4';
                              Severity: Major
                              Found in app/components/media/media-rating.js - About 30 mins to fix

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

                                  didInsertElement() {
                                    this._super(...arguments);
                                    const element = get(this, 'element');
                                    element.classList.add(get(this, 'bufferClass'));
                                
                                
                                Severity: Minor
                                Found in lib/kitsu-shared/addon/components/occludable-area.js - About 25 mins 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 processLinks has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    processLinks(content, force = false) {
                                      // reset the skipped embeds if the content is empty (this will be from a deletion)
                                      if (isEmpty(content) || (isPresent(this.get('fileQueue.files')) || this.get('upload'))) {
                                        this.set('skippedEmbeds', []);
                                        return;
                                Severity: Minor
                                Found in app/components/stream-feed/items/post/comment-box.js - About 25 mins 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 transitionTo has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    transitionTo(item) {
                                      invokeAction(this, 'close');
                                      if (typeOf(item) === 'string') {
                                        get(this, 'router').transitionTo(item);
                                      } else {
                                Severity: Minor
                                Found in app/components/search-results/group.js - About 25 mins 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 queryParamsDidChange has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  queryParamsDidChange({ shouldRefresh, changed }) {
                                    // save to cache
                                    if (get(this, 'session').isCurrentUser(get(this, 'user'))) {
                                      const cache = get(this, 'cache');
                                      if ('media' in changed) {
                                Severity: Minor
                                Found in app/controllers/users/library.js - About 25 mins 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 updateLibraryEntry has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  updateLibraryEntry: task(function* (force = false) {
                                    set(this, 'didUndo', false);
                                    if (get(this, 'session.hasUser')) {
                                      const entry = yield get(this, 'getLibraryEntry').perform();
                                
                                
                                Severity: Minor
                                Found in app/components/episodes/video-updater.js - About 25 mins 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

                                Severity
                                Category
                                Status
                                Source
                                Language