Showing 12,761 of 12,761 total issues
Function validateSearchTermSubmit
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const validateSearchTermSubmit = (
searchTerm,
dispatchError,
error,
filters,
Function addMapMarker
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
const addMapMarker = (institution, index, locationBounds, mapMarkers) => {
const { latitude, longitude, name } = institution;
const lngLat = new mapboxgl.LngLat(longitude, latitude);
const markerElement = document.createElement('div');
Function constructor
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(props) {
super(props);
// Throw an error if there’s no viewField (should be React component)
if (!isReactComponent(this.props.uiSchema['ui:options'].viewField)) {
Function fileUploadUi
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function fileUploadUi(content) {
return {
...fileUiSchema(content.label, {
buttonText: 'Upload file',
addAnotherLabel: 'Upload another file',
Function prepareAddressData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const prepareAddressData = formData => {
let addressData = {
veteranName: formData.fullName,
addressLine1: formData.addressLine1,
addressLine2: formData.addressLine2,
Function validateAddress
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function validateAddress(errors, address, formData, currentSchema) {
// Adds error message for state if it is blank and one of the following countries:
// USA, Canada
if (
countriesWithStateCodes.has(address.country) &&
Function HealthcareError
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
const HealthcareError = () => {
// status will be 'warning' if toggle is on
const status = useToggleValue(TOGGLE_NAMES.myVaUpdateErrorsWarnings)
? 'warning'
: 'error';
Function idcard
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function idcard(state = initialState, action) {
switch (action.type) {
case ATTRS_FETCHING:
return {
...state,
Function ContactInfoNeeded
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const ContactInfoNeeded = () => {
const email = useSelector(state =>
selectVAPContactInfoField(state, FIELD_NAMES.EMAIL),
);
const mailingAddress = useSelector(state =>
Function mapStateToProps
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const mapStateToProps = state => {
const mailingFieldName = VAP_SERVICE.FIELD_NAMES.MAILING_ADDRESS;
const {
apiRoute,
Function EditConfirmCancelModal
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const EditConfirmCancelModal = props => {
const { activeSection, onHide, isVisible } = props;
const { onCancel } = useContext(EditContext);
Function sharingReducer
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const sharingReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.Sharing.STATUS: {
const { consentStatus } = action.response;
return {
Function generateTxt
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
async () => {
setDownloadStarted(true);
setDownloadType('txt');
setBlueButtonRequested(true);
dispatch(clearAlerts());
Function failedMsg
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
const failedMsg = () => {
return (
<va-alert
status="warning"
visible
Function getRecordType
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getRecordType = record => {
if (record.resourceType === fhirResourceTypes.DIAGNOSTIC_REPORT) {
if (record.code?.text === 'CH') return labTypes.CHEM_HEM;
if (
record.code?.coding?.some(
Function benefitEndDateExplanation
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function benefitEndDateExplanation(condition, delimitingDate) {
switch (condition) {
case 'activeDuty':
return (
<div className="section benefit-end-date">
Function buildNonVAPrescriptionTXT
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const buildNonVAPrescriptionTXT = prescription => {
return `
---------------------------------------------------------------------------------
Identical blocks of code found in 9 locations. Consider refactoring. Open
{
resourceType: 'Organization',
id: 'OrgPerformer-989',
meta: {
profile: [
- 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 58.
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
Identical blocks of code found in 9 locations. Consider refactoring. Open
{
resourceType: 'Organization',
id: 'OrgPerformer-989',
meta: {
profile: [
- 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 58.
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
Identical blocks of code found in 9 locations. Consider refactoring. Open
{
resourceType: 'Organization',
id: 'OrgPerformer-989',
meta: {
profile: [
- 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 58.
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