Showing 12,850 of 12,850 total issues
Function Rad
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const Rad = ({ data = {}, error, setPageData }) => {
const [errorMessage, setErrorMessage] = useState(null);
const checkValid = (value = data.radDate) => {
if (value) {
- 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 paymentInformation
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
paymentInformation: formData => {
const paymentInformation = get('view:bankAccount', formData);
if (paymentInformation && !objectIsEmpty(paymentInformation)) {
if (!paymentInformation.bankAccountType)
recordMissingField(
- 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 TopicSelectPage
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const TopicSelectPage = props => {
const {
onChange,
loggedIn,
goBack,
- 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 render
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { schema, uiSchema, path, pageTitle, formContext } = this.props;
const uiOptions = uiSchema['ui:options'] || {};
const fieldName = path[path.length - 1];
- 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 CustomPageReviewField
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const CustomPageReviewField = ({ name, data }) => {
const getNameKey = str => {
if (str.includes('_')) {
return str.split('_')[0];
}
- 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 UserNav
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const UserNav = ({ isMobile }) => {
const profile = useSelector(selectUserProfile);
const isLoading = useSelector(selectIsUserLoading);
const uniqueId = useRef(generateUniqueId());
- 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 ConfirmationPageView
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const ConfirmationPageView = ({
formType = 'application',
submitterHeader = 'Applicant',
submitterName,
submitDate,
- 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 InstallmentContractSummary
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const InstallmentContractSummary = ({
goToPath,
contentBeforeButtons,
contentAfterButtons,
}) => {
- 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 OtherAssetsChecklist
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const OtherAssetsChecklist = ({
data,
goBack,
goForward,
goToPath,
- 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 MonetaryInputList
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const MonetaryInputList = props => {
const { errorSchema, formContext } = props;
const errorList = errorSchema?.monetaryAssets?.__errors;
const { submitted } = formContext;
- 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 render
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
render() {
const downloadStatus = this.props.letterDownloadStatus;
const letterItems = (this.props.letters || []).map((letter, index) => {
let content;
let letterTitle;
- 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 App
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const App = ({ isPilot }) => {
useTrackPreviousUrl();
const dispatch = useDispatch();
const user = useSelector(selectUser);
const userServices = user.profile.services; // mhv_messaging_policy.rb defines if messaging service is avaialble when a user is in Premium status upon structuring user services from the user profile in services.rb
- 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 sendReply
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const sendReply = (
replyToId,
message,
attachments,
) => async dispatch => {
- 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 MessageReply
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const MessageReply = () => {
const dispatch = useDispatch();
const { replyId } = useParams();
const { drafts, error, messages } = useSelector(
state => state.sm.threadDetails,
- 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 selectComment
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function selectComment(appointment) {
if (!appointment) return '';
if (appointment.version === 2) {
return appointment.comment ? appointment.comment : 'none';
- 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 selectAppointmentDetails
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function selectAppointmentDetails(appointment) {
if (!appointment) return '';
if (appointment.version === 2) {
return appointment.comment ? appointment.comment : 'none';
- 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 resetFormDataOnTypeOfCareChange
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function resetFormDataOnTypeOfCareChange(pages, oldData, data) {
let newPages = pages;
let newData = data;
if (getTypeOfCare(newData)?.id !== getTypeOfCare(oldData)?.id) {
- 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 sortUpcoming
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function sortUpcoming(a, b) {
if (
CONFIRMED_APPOINTMENT_TYPES.has(a.vaos.appointmentType) !==
CONFIRMED_APPOINTMENT_TYPES.has(b.vaos.appointmentType)
) {
- 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 getLink
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function getLink({ featureBreadcrumbUrlUpdate, appointment }) {
const { isCommunityCare, isPastAppointment } = appointment.vaos;
if (!featureBreadcrumbUrlUpdate) {
return isCommunityCare
- 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 ContactInformation
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export default function ContactInformation({ institution, showModal }) {
const isOJT = institution.type && institution.type.toLowerCase() === 'ojt';
const versionedSchoolCertifyingOfficials = _.get(
institution,
- 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"