Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date converter form #395

Merged
merged 87 commits into from
Jan 16, 2024
Merged

Date converter form #395

merged 87 commits into from
Jan 16, 2024

Conversation

khoidt
Copy link
Contributor

@khoidt khoidt commented Sep 25, 2023

No description provided.

copyToClipboard: () => Promise<void>
}

function useConverterForm(): ConverterFormParams {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function useConverterForm has 26 lines of code (exceeds 25 allowed). Consider refactoring.

}
}

function DateConverterForm(): JSX.Element {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function DateConverterForm has 37 lines of code (exceeds 25 allowed). Consider refactoring.

})
}

function getDayInputGroup(props: InputGroupsProps): JSX.Element {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

@@ -237,39 +207,50 @@ function getDateInputGroup({
)
}

function getYearInputGroup(props: InputGroupsProps): JSX.Element {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

copyToClipboard: () => Promise<void>
}

function useConverterForm(): ConverterFormParams {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function useConverterForm has 27 lines of code (exceeds 25 allowed). Consider refactoring.

if (this.king?.date) {
return this.getKingDate(year)
}
return ''
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid too many return statements within this function.

this.ur3Calendar = ur3Calendar
}

toJulianDate(): string {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function toJulianDate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.

@@ -0,0 +1,278 @@
import { MesopotamianDate } from 'chronology/domain/Date'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File DateSelectionState.ts has 257 lines of code (exceeds 250 allowed). Consider refactoring.

if (field.name === 'seBabylonianYear') {
return getSeBabylonianYearOptions()
}
return []
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid too many return statements within this function.

} from 'chronology/domain/DateConverterBase'
import { Field } from 'chronology/application/DateConverterFormFieldData'

export default function getOptions({
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getOptions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.

: []
}

const getYearOptions = (field: Field): JSX.Element[] => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getYearOptions has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.

return []
}

const getDayOptions = (
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getDayOptions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 9334 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 9281 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 9395 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 9399 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 9395 lines exceeds the maximum allowed for the inline comments feature.

Copy link

codeclimate bot commented Jan 16, 2024

Code Climate has analyzed commit 32e3d43 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 93.0% (75% is the threshold).

This pull request will bring the total coverage in the repository to 91.0% (0.0% change).

View more on Code Climate.

@khoidt khoidt merged commit 4cdb1e3 into master Jan 16, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant