bookbrainz/bookbrainz-site

View on GitHub

Showing 365 of 1,033 total issues

Function ContributePage has 74 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function ContributePage(): JSX.Element {
    const IRCLink = 'https://kiwiirc.com/nextclient/irc.libera.chat/?#bookbrainz';
    const styleLink = 'https://bookbrainz-user-guide.readthedocs.io/';

    return (
Severity: Major
Found in src/client/components/pages/contribute.tsx - About 2 hrs to fix

    File edition-section-merge.tsx has 290 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Copyright (C) 2019 Nicolas Pelletier
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
    Severity: Minor
    Found in src/client/entity-editor/edition-section/edition-section-merge.tsx - About 2 hrs to fix

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

          render() {
              const noResults = !this.props.results || this.props.results.length === 0;
              const results = this.props.results.map((result) => {
                  if (!result) {
                      return null;
      Severity: Major
      Found in src/client/components/pages/parts/admin-panel-search-results.tsx - About 2 hrs to fix

        File author.ts has 286 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * Copyright (C) 2015       Ben Ockmore
         *               2015-2016  Sean Burke
         *
         * This program is free software; you can redistribute it and/or modify
        Severity: Minor
        Found in src/server/routes/entity/author.ts - About 2 hrs to fix

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

              render() {
                  const {collection} = this.props;
                  // eslint-disable-next-line one-var
                  let modalBody, modalTitle, submitButton;
                  if (this.props.isDelete) {

            File revision.js has 284 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
             * Copyright (C) 2015-2016  Ben Ockmore
             *               2016       Sean Burke
             *
             * This program is free software; you can redistribute it and/or modify
            Severity: Minor
            Found in src/server/routes/revision.js - About 2 hrs to fix

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

                  render() {
                      const {mergeQueue} = this.props;
                      if (isNil(mergeQueue)) {
                          return null;
                      }
              Severity: Major
              Found in src/client/components/pages/parts/merge-queue.js - About 2 hrs to fix

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

                    render() {
                        const [achievements, locked] = this.renderAchievements();
                
                        let rankUpdate;
                        if (this.props.isOwner) {
                Severity: Major
                Found in src/client/components/pages/parts/editor-achievements.js - About 2 hrs to fix

                  Function seriesToFormState has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function seriesToFormState(series) {
                      const aliases = series.aliasSet ?
                          series.aliasSet.aliases.map(({languageId, ...rest}) => ({
                              ...rest,
                              language: languageId
                  Severity: Major
                  Found in src/server/routes/entity/series.ts - About 2 hrs to fix

                    File publisher.ts has 281 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*
                     * Copyright (C) 2015       Ben Ockmore
                     *               2015-2016  Sean Burke
                     *
                     * This program is free software; you can redistribute it and/or modify
                    Severity: Minor
                    Found in src/server/routes/entity/publisher.ts - About 2 hrs to fix

                      Function authorToFormState has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function authorToFormState(author) {
                          /** The front-end expects a language id rather than the language object. */
                          const aliases = author.aliasSet ?
                              author.aliasSet.aliases.map(({languageId, ...rest}) => ({
                                  ...rest,
                      Severity: Major
                      Found in src/server/routes/entity/author.ts - About 2 hrs to fix

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

                            render() {
                                const entityTypeSelect = Array.isArray(this.props.entityTypes) ? (
                                    <DropdownButton
                                        as={InputGroup.Append}
                                        id="entity-type-select"
                        Severity: Major
                        Found in src/client/components/pages/parts/search-field.tsx - About 2 hrs to fix

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

                              render() {
                                  let reviewContent;
                                  const mapEntityType = {
                                      Author: 'author',
                                      EditionGroup: 'edition-group',
                          Severity: Major
                          Found in src/client/components/pages/entities/cb-review.js - About 2 hrs to fix

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

                                    async function render(props) {
                                        const {initialState} = props;
                                        initialState.nameSection = {
                                            disambiguation: '',
                                            exactMatches: null,
                            Severity: Major
                            Found in src/server/routes/entity/edition.ts - About 2 hrs to fix

                              File series.ts has 278 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /*
                               * Copyright (C) 2021  Akash Gupta
                               *
                               * This program is free software; you can redistribute it and/or modify
                               * it under the terms of the GNU General Public License as published by
                              Severity: Minor
                              Found in src/server/routes/entity/series.ts - About 2 hrs to fix

                                Function publisherToFormState has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function publisherToFormState(publisher) {
                                    /** The front-end expects a language id rather than the language object. */
                                    const aliases = publisher.aliasSet ?
                                        publisher.aliasSet.aliases.map(({languageId, ...rest}) => ({
                                            ...rest,
                                Severity: Major
                                Found in src/server/routes/entity/publisher.ts - About 2 hrs to fix

                                  Function workToFormState has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function workToFormState(work) {
                                      /** The front-end expects a language id rather than the language object. */
                                      const aliases = work.aliasSet ?
                                          work.aliasSet.aliases.map(({languageId, ...rest}) => ({
                                              ...rest,
                                  Severity: Major
                                  Found in src/server/routes/entity/work.ts - About 2 hrs to fix

                                    File revision.js has 274 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    /*
                                     * Copyright (C) 2015-2016  Stanisław Szcześniak
                                     *               2015-2016  Ben Ockmore
                                     *               2016       Sean Burke
                                     *
                                    Severity: Minor
                                    Found in src/client/components/pages/revision.js - About 2 hrs to fix

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

                                      function FAQPage(): JSX.Element {
                                          return (
                                              <Card>
                                                  <Card.Header as="h2">
                                                      Frequently Asked Questions
                                      Severity: Major
                                      Found in src/client/components/pages/faq.tsx - About 2 hrs to fix

                                        File entityRouteUtils.tsx has 269 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        /*
                                         * Copyright (C) 2017  Eshan Singh
                                         *
                                         * This program is free software; you can redistribute it and/or modify
                                         * it under the terms of the GNU General Public License as published by
                                        Severity: Minor
                                        Found in src/server/helpers/entityRouteUtils.tsx - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language