MetaPhase-Consulting/State-TalentMAP

View on GitHub

Showing 173 of 173 total issues

Function AvailableBidderStats has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

const AvailableBidderStats = () => {
  const [showMore, setShowMore] = useState(false);
  const [selectedStat, setSelectedStat] = useState('Post');

  const statOptions = [

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 RemarksPill has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

const RemarksPill = props => {
  const { remark, isEditable, updateSelection, fromAIM } = props;

  const formatRemarkText = (r) => {
    // we can just grab the already merged text from the BE, but it would mean
Severity: Minor
Found in src/Components/Agenda/RemarksPill/RemarksPill.jsx - About 45 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 render has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

  render() {
    const { details, isProjectedVacancy, userProfile } = this.props;
    const { isClient, isTandemTwo } = this.context;
    const isFilled = details.status === 'FP';
    const OBCUrl$ = propOrDefault(details, 'post.post_overview_url');
Severity: Minor
Found in src/Components/PositionTitle/PositionTitle.jsx - About 45 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 render has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

   render() {
     const {
       totalUsers,
       usersList,
       usersIsLoading,
Severity: Minor
Found in src/Components/AdministratorPage/UserRoles/UserRoles.jsx - About 45 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 getUsers has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

export function getUsers(page = 1, limit = 100, sort, filters, q_username, q_name) {
Severity: Minor
Found in src/actions/userRoles.js - About 45 mins to fix

    Function notificationsFetchData has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    export function notificationsFetchData(limit = 5, page = 1, ordering = '-date_created', tags = undefined, isRead = undefined, useDateRange = true) {
    Severity: Minor
    Found in src/actions/notifications.js - About 45 mins to fix

      Function userProfileToggleFavoritePosition has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      export function userProfileToggleFavoritePosition(id, remove, refreshFavorites = false,
        isPV = false, sortType, isTandem = false) {
      Severity: Minor
      Found in src/actions/userProfile.js - About 45 mins to fix

        Function getCustomLocation has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        export function getCustomLocation(loc: any, org: string): string {
          if (!loc) return NO_POST;
          // DC Post - org ex. GTM/EX/SDD
          if (get(loc, 'state') === 'DC') return org || NO_POST;
          // Domestic outside of DC - City, State
        Severity: Minor
        Found in src/utilities.tsx - About 45 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

        Consider simplifying this complex logical expression.
        Open

          if (vice || vacancy) {
            return `${vice || ''}${(vice && vice !== 'Multiple Incumbents' && vacancy) ? ', ' : ''} ${vacancy || ''}`;
          }
        Severity: Major
        Found in src/Components/Agenda/Constants.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                  if (
                    (!employeeDataLoading && (employeeDataError || !hruId)) ||
                    (!empProfileLoading && (empProfileError || !hruId))
                  ) {
                    return errorAlert;
          Severity: Major
          Found in src/Components/Agenda/AgendaItemResearchPane/AgendaItemResearchPane.jsx - About 40 mins to fix

            Function toastSuccess has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            export function toastSuccess(toast, title, id, isUpdate, options) {
            Severity: Minor
            Found in src/actions/toast.js - About 35 mins to fix

              Function markNotification has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              export function markNotification(id, isRead = true, shouldDelete = false,
                bypassTrackerUpdate = false, cb = () => {}) {
              Severity: Minor
              Found in src/actions/notifications.js - About 35 mins to fix

                Function toastError has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                export function toastError(toast, title, id, isUpdate, options) {
                Severity: Minor
                Found in src/actions/toast.js - About 35 mins to fix

                  Function toastWarning has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  export function toastWarning(toast, title, id, isUpdate, options) {
                  Severity: Minor
                  Found in src/actions/toast.js - About 35 mins to fix

                    Function toggleBidPosition has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    export function toggleBidPosition(id, remove, isClient, clientId, fromTracker) {
                    Severity: Minor
                    Found in src/actions/bidList/bidList.js - About 35 mins to fix

                      Function modifyAgenda has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      export function modifyAgenda(panel, legs, personId, ef, refData) {
                      Severity: Minor
                      Found in src/actions/agendaItemMaintenancePane.js - About 35 mins to fix

                        Function toastInfo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        export function toastInfo(toast, title, id, isUpdate, options) {
                        Severity: Minor
                        Found in src/actions/toast.js - About 35 mins to fix

                          Function assignmentSeparationAction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          export function assignmentSeparationAction(query, perdet, id, isSeparation, onSuccess) {
                          Severity: Minor
                          Found in src/actions/assignment.js - About 35 mins to fix

                            Function render has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                              render() {
                                const { bid, hideDelete, showBidCount, useCDOView, bidTakenFlag } = this.props;
                                const { readOnly } = this.context;
                                const { position_info } = bid;
                                const position = get(bid, 'position_info.position') || {};
                            Severity: Minor
                            Found in src/Components/BidTracker/BidTrackerCardTop/BidTrackerCardTop.jsx - About 35 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 AddToInternalListButton has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                            const AddToInternalListButton = props => {
                              const {
                                refKey,
                                toggleAvailableBidder,
                                isLoading,

                            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