Showing 12,848 of 12,848 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
<div>
Requires 2 doses
<br />
Plan to return{' '}
<strong>
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 70.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
{
title: {
heading: CTRatingsHeaders.m4,
m4Avg: '0',
},
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 70.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
<ul className="vads-u-padding-bottom--1">
<li className="vads-u-margin-bottom--0">
We’re not sure when you’ll need to fill this prescription,{' '}
<strong>or</strong>
</li>
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 70.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
<p className="vads-u-margin-bottom--2">
{phase0p5Flag ? (
<va-link
href="/my-health/secure-messages/new-message/"
text="Start a new message"
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 70.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
<ul className="va-list--disc">
{failedMeds?.map((item, idx) => (
<li
className="vads-u-padding-y--0 vads-u-font-weight--bold"
data-testid="medication-requested-failed"
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 70.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (
e.errors &&
(e.errors[0].code === Constants.Errors.Code.BLOCKED_USER ||
e.errors[0].code === Constants.Errors.Code.BLOCKED_USER2)
) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 70.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function generateResultsContent
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
const generateResultsContent = async (doc, parent, data, config) => {
const results = doc.struct('Sect', {
title: 'Results',
});
parent.add(results);
Function createDetailItem
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
const createDetailItem = async (doc, config, x, item) => {
const paragraphOptions = { lineGap: 6 };
let titleText = item.title ?? '';
const content = [];
const monospaceFont = config.text.monospaceFont || config.text.font;
Function render
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const alertContent = (
<div>
<p>
This will remove your {toLower(this.props.title)} across many VA
Function NeedHelp
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function NeedHelp() {
const isIntro = window.location.pathname.endsWith('/introduction');
return isIntro ? (
<>
<p>
Function BenefitsSelection
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function BenefitsSelection(props) {
const state = useFormikContext();
return (
<>
Function board
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const board = (formValues, noDRB) => {
if (!formValues) return null;
const prevAppType =
['1', '4'].indexOf(formValues['10_prevApplicationType']) > -1;
Function createOldSchoolPage
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function createOldSchoolPage(schema) {
const { trainingEndDate, reasonForChange } = schema.properties;
const { school, date } = schema.definitions;
return {
path: 'school-selection/old-school',
Function schema
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function schema(currentSchema, userOptions) {
const options = {
fields: ['serviceBranch', 'dateRange'],
required: [],
...userOptions,
Function CollapsibleList
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CollapsibleList = () => {
return (
<div id="SupportingFiles-collapsiblePanel">
<div className="input-section">
<div
Function onDownloadLinkClick
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export async function onDownloadLinkClick(event, reduxStore) {
// This function purpose is to determine if the PDF is valid on click.
// Once it's done, it passes information to DownloadHandler() which determines what to render.
event.preventDefault();
Function transformForSubmit
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function transformForSubmit(formConfig, form) {
const transformedData = JSON.parse(
formsSystemTransformForSubmit(formConfig, form),
);
Function onUpdateClicked
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
const onUpdateClicked = async () => {
const addressState = {
...stateAndZip,
state: stateAndZip.stateCode,
};
Function WarningStatus
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
const WarningStatus = () => {
const {
statusCode,
applicationDate,
enrollmentDate,
Function IdentityVerificationForm
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
const IdentityVerificationForm = props => {
const { data, onLogin, onChange, onSubmit } = props;
const {
vesRecordFound,
hasServerError,