MetaPhase-Consulting/State-TalentMAP

View on GitHub

Showing 172 of 172 total issues

Avoid too many return statements within this function.
Open

        return (<div id="aim-classifications"> {/* needed for css specificity */}
          <Classifications {...classificationsProps} />
        </div>);
Severity: Major
Found in src/Components/Agenda/AgendaItemResearchPane/AgendaItemResearchPane.jsx - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

      return x;
    Severity: Major
    Found in src/utilities.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                return errorAlert;
      Severity: Major
      Found in src/Components/Agenda/AgendaItemResearchPane/AgendaItemResearchPane.jsx - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return (<RemarksGlossary
                  remarks={remarks$}
                  isReadOnly={readMode}
                  remarkCategories={rmrkCategories$}
                  userSelections={userSelections}
        Severity: Major
        Found in src/Components/Agenda/AgendaItemResearchPane/AgendaItemResearchPane.jsx - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                return new Date(hs_date_offered);
          Severity: Major
          Found in src/Components/Handshake/EditHandshake/EditHandshake.jsx - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return bidClassObject;
            Severity: Major
            Found in src/Components/BidTracker/BidPhaseConfig/Complete.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                        return errorAlert;
              Severity: Major
              Found in src/Components/Agenda/AgendaItemResearchPane/AgendaItemResearchPane.jsx - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return new Date();
                Severity: Major
                Found in src/Components/Handshake/EditHandshake/EditHandshake.jsx - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                            return errorAlert;
                  Severity: Major
                  Found in src/Components/Agenda/AgendaItemResearchPane/AgendaItemResearchPane.jsx - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                      return x;
                    Severity: Major
                    Found in src/utilities.tsx - About 30 mins to fix

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

                      export function shouldShowAlert(bid, { condensedView = false }) {
                        // TO-DO - Add APPROVED_PROP back in with meanginful information
                        const alertStatusArray = [DRAFT_PROP, CLOSED_PROP, HAND_SHAKE_ACCEPTED_PROP,
                          HAND_SHAKE_DECLINED_PROP, DECLINED_PROP, HAND_SHAKE_NEEDS_REGISTER_PROP, SUBMITTED_PROP];
                      
                      
                      Severity: Minor
                      Found in src/Components/BidTracker/BidHelpers.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 PanelMeetingSearchRow has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      const PanelMeetingSearchRow = ({ isCDO, pm, selectAll }) => {
                        const pmSeqNum = get(pm, 'pmi_pm_seq_num') || FALLBACK;
                        const remarks = get(pm, 'allRemarks') || [];
                        const showPanelMeetingsAgendas = usePanelMeetingsAgendas();
                        const userProfile = useSelector(state => state.userProfile);
                      Severity: Minor
                      Found in src/Components/Panel/PanelMeetingSearchRow/PanelMeetingSearchRow.jsx - 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 PositionInformation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      const PositionInformation = ({ assignment = {} }) => {
                        const assignmentStartDate = assignment.start_date ? formatDate(assignment.start_date) : false;
                        let assignmentEndDate;
                        assignmentEndDate = (assignment.status === 'active' && assignment.estimated_end_date) ?
                          assignment.estimated_end_date : assignment.end_date;

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

                      export const mapDuplicates = (data = [], propToCheck = 'custom_description', transformFunc) => data.slice().map((p) => {
                        let p$ = { ...p };
                        const matching = data.filter(f =>
                          f[propToCheck] === p$[propToCheck],
                        ) || [];
                      Severity: Minor
                      Found in src/utilities.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 render has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                        render() {
                          const { editType } = this.state;
                          const { bidderPortfolio, bidderPortfolioIsLoading, cdosLength, pageNumber,
                            bidderPortfolioHasErrored, pageSize, queryParamUpdate,
                            classificationsIsLoading, updatePagination, viewType,

                      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 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                        render() {
                          const { bidList, deleteBid, isPublic,
                            bidListHasErrored, bidListIsLoading, bidListToggleHasErrored,
                            bidListToggleSuccess, submitBidPosition,
                            submitBidHasErrored, submitBidIsLoading, submitBidSuccess,
                      Severity: Minor
                      Found in src/Containers/BidTracker/BidTracker.jsx - 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 ResultsCondensedCardTop has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      const ResultsCondensedCardTop = ({
                        position,
                        isProjectedVacancy,
                        isRecentlyAvailable,
                        isTandem,
                      Severity: Minor
                      Found in src/Components/ResultsCondensedCardTop/ResultsCondensedCardTop.jsx - 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 render has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                        render() {
                          const { data, isLoading, userProfile } = this.props;
                          const { editorVisible, headerDropdownVisible } = this.state;
                          const permissionsNeeded = ['superuser'];
                          const userPermissions = get(userProfile, 'permission_groups', []);
                      Severity: Minor
                      Found in src/Components/Header/BetaHeader/BetaHeader.jsx - 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 BidAuditModal has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      const BidAuditModal = ({ setOpen }) => {
                        const dispatch = useDispatch();
                      
                        useEffect(() => {
                          dispatch(bidAuditFetchCycles());
                      Severity: Minor
                      Found in src/Components/AdministratorPage/bidAudit/BidAuditModal.jsx - 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 EntryLevelCard has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      const EntryLevelCard = ({ result, id, onEditModeSearch }) => {
                        const showManageEntryLevelEdit = useManageEntryLevelEdit();
                        const dispatch = useDispatch();
                      
                        const pos = result;
                      Severity: Minor
                      Found in src/Components/AdministratorPage/ManageEntryLevel/EntryLevelCard.jsx - 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