MetaPhase-Consulting/State-TalentMAP

View on GitHub

Showing 172 of 172 total issues

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

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

  setDefaultValue(props) {
    const { selection } = this.state;
    const { includeFirstEmptyOption, defaultSort } = props;
    if (includeFirstEmptyOption && !selection.length && (defaultSort || isString(defaultSort))) {
      this.selectOption({ target: { value: defaultSort || '' } });
Severity: Minor
Found in src/Components/SelectForm/SelectForm.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 BidList has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

const BidList = ({ bids, submitBidPosition, deleteBid, registerHandshake, isLoading, isPublic,
  userId, userProfile, userProfileIsLoading, unregisterHandshake }) => {
  // Push the priority bid to the top. There should only be one priority bid.
  // eslint rules seem to step over themselves here between using "return" and a ternary
  // eslint-disable-next-line no-confusing-arrow
Severity: Minor
Found in src/Components/ProfileDashboard/BidList/BidList.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 BidAuditCard has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

const BidAuditCard = ({ data, onEditModeSearch }) => {
  const {
    audit_id,
    audit_desc,
    cycle_id,
Severity: Minor
Found in src/Components/AdministratorPage/bidAudit/BidAuditCard.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 GsaLocations has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

const GsaLocations = ({ setLocation, activeAIL }) => {
  const dispatch = useDispatch();
  const locations = useSelector(state => state.gsaLocations);
  const locationsLoading = useSelector(state => state.gsaLocationsFetchDataLoading);
  const locationsErrored = useSelector(state => state.gsaLocationsFetchDataErrored);

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

const BureauExceptions = () => {
  const dispatch = useDispatch();

  const bureauExceptionsHasErrored = useSelector(state => state.bureauExceptionsHasErrored);
  const bureauExceptionsIsLoading = useSelector(state => state.bureauExceptionsIsLoading);
Severity: Minor
Found in src/Components/AdministratorPage/BureauExceptions/BureauExceptions.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 scrollToId has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

export const scrollToId = ({ el, config = {} }) => {
  // Get an element's distance from the top of the page
  const getElemDistance = (elem) => {
    let location = 0;
    if (elem.offsetParent) {
Severity: Minor
Found in src/utilities.js - 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 assignmentSeparationAction has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

export function assignmentSeparationAction(query, perdet, id, isSeparation, onSuccess) {
  const type = isSeparation ? 'separations' : 'assignments';

  let toastSuccessMessage = CREATE_ALT_ASSIGNMENT_SUCCESS;
  let toastSuccessTitle = CREATE_ALT_ASSIGNMENT_SUCCESS_TITLE;
Severity: Minor
Found in src/actions/assignment.js - 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 render has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  render(): React.ReactNode {
    const { type, title, messages, isAriaLive, isDivided, customClassName, tinyAlert } = this.props;
    // 'type' is injected into the class name
    // type 'error' requires an ARIA role

Severity: Minor
Found in src/Components/Alert/Alert.tsx - 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 scrollToId has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

export const scrollToId = ({ el, config = {} }: any): void => {
  // Get an element's distance from the top of the page
  const getElemDistance = (elem: HTMLElement) => {
    let location = 0;
    if (elem.offsetParent) {
Severity: Minor
Found in src/utilities.tsx - 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 OBCUrl has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

const OBCUrl: React.FC<Props> = props => {
  const { type = 'post', label = null, isButton = false, altStyle = false, url = {} } = props;
  let text; // link text value
  let url$ = get(url, 'internal');

Severity: Minor
Found in src/Components/OBCUrl/OBCUrl.tsx - 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

Avoid too many return statements within this function.
Open

      return [...sections.bodyPrimary, ...appendSecondary];
Severity: Major
Found in src/Components/PositionExpandableContent/PositionExpandableContent.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 <Spinner type="employee-profile-preview" size="small" />;
      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 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 (<FrequentPositions
                    positions={frequentPositions}
                    addFrequentPosition={addFrequentPosition}
                    disabled={((legCount >= 10) || readMode)}
                  />);
          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 sections.bodyPrimary;
            Severity: Major
            Found in src/Components/PositionExpandableContent/PositionExpandableContent.jsx - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return (
                        <Worker workerUrl={getAssetPath('/static/js/pdf.worker.js')}>
                          {url && <Viewer fileUrl={url} />}
                        </Worker>
                      );
              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 errorAlert;
                Severity: Major
                Found in src/Components/Agenda/AgendaItemResearchPane/AgendaItemResearchPane.jsx - About 30 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language