Showing 180 of 180 total issues
Function AgendaLegFormEdit
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
const AgendaLegFormEdit = props => {
const {
AIvalidation,
isEf, // check if leg is first leg (effective leg)
leg,
- Read upRead up
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 NotificationCard
has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring. Open
const NotificationCard = (props) => {
const { note, onCancel, memo } = props;
const dispatch = useDispatch();
- Read upRead up
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 AssignmentCycleEdit
has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring. Open
const AssignmentCycleEdit = ({ isAO, match }) => {
const dispatch = useDispatch();
const userProfile = useSelector(state => state.userProfile);
const isSuperUser = userHasPermissions(['superuser'], userProfile?.permission_groups);
- Read upRead up
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 AvailableBidderRow
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
const AvailableBidderRow = (props) => {
const { bidder, internalViewToggle, isLoading, isAO, isPost,
isInternalCDA, bureaus, sort } = props;
useCloseSwalOnUnmount();
- Read upRead up
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 AgendaItemMaintenancePane
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
const AgendaItemMaintenancePane = (props) => {
const useAgendaItemMaintenanceCreate = () => checkFlag('flags.agenda_item_maintenance_create');
const dispatch = useDispatch();
- Read upRead up
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 PanelMeetingAdmin
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
const PanelMeetingAdmin = (props) => {
const { history, panelMeetingsResults, panelMeetingsIsLoading, pmSeqNum } = props;
const isCreate = !pmSeqNum;
const dispatch = useDispatch();
- Read upRead up
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 AvailableBidderTable
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
const AvailableBidderTable = props => {
const { isInternalCDA, isAO, isPost } = props;
// Local state
// Toggle view state within Internal CDA version
- Read upRead up
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 (editMode) {
setValues({
location: result?.location,
status: result?.status,
tod: result?.tod,
Function BidAuditGrade
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
const BidAuditGrade = (props) => {
const dispatch = useDispatch();
const routeCycleID = props?.match.params.cycleId;
const routeAuditID = props?.match.params.auditId;
- Read upRead up
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 AgendaItemResearchPane
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
const AgendaItemResearchPane = forwardRef((props = { perdet: '', clientData: {}, updateSelection: '', userSelection: [], legCount: 0, readMode: true }, ref) => {
const navTabRef = useRef();
const dispatch = useDispatch();
const { perdet, clientData, userSelections, updateSelection, legCount,
- Read upRead up
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 PanelMeetingSearch
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
const PanelMeetingSearch = ({ isCDO }) => {
const dispatch = useDispatch();
const showAddPanelMeeting = usePanelAdmin() && usePanelAdminPanelMeeting();
- Read upRead up
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 EmployeeAgendaSearch
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
const EmployeeAgendaSearch = ({ isCDO, viewType }) => {
const searchLastNameRef = useRef();
const searchFirstNameRef = useRef();
const searchEmpIDRef = useRef();
- Read upRead up
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 Separation
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
const Separation = (props) => {
const {
perdet,
data,
isNew,
- Read upRead up
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 PositionExpandableContent
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
const PositionExpandableContent = ({
sections, form, appendAdditionalFieldsToBodyPrimary, tempHideEdit,
showLoadingAnimation, onShowMore, isCondensed, saveText, useCancelModal }) => {
const handleEdit = form?.handleEdit ?? {};
const { editMode, setEditMode, disableEdit } = handleEdit;
- Read upRead up
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 EditHandshake
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
const EditHandshake = props => {
const { submitAction, handshake, infoOnly, submitText, bidCycle } = props;
const { hs_date_expiration, hs_date_offered, hs_status_code } = handshake;
const currentlyOffered = hs_status_code === 'handshake_offered';
- Read upRead up
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 Assignment
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
const Assignment = (props) => {
const {
perdet,
data,
isNew,
- Read upRead up
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 BiddingToolCard
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
const BiddingToolCard = (props) => {
const { id, location: routeLocation } = props;
const isCreate = id === 'new';
const rootLocation = () => {
- Read upRead up
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 EditBidder
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
const EditBidder = (props) => {
const { name, sections, submitAction, bureaus, details } = props;
const [status, setStatus] = useState(details.status);
const [note, setNote] = useState(sections.notes);
const [ocReason, setOCReason] = useState(details.ocReason);
- Read upRead up
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 PanelMeetingAgendas
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
const PanelMeetingAgendas = (props) => {
const { isCDO, location } = props;
const panelMeetings = location.state?.panelMeetings || [];
const pmSeqNums = sortBy(panelMeetings.map(pm => pm.pmi_pm_seq_num), (n) => n);
- Read upRead up
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 Preview
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
const Preview = (props) => {
const {
note,
cable,
onCancel,
- Read upRead up
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"