-
Notifications
You must be signed in to change notification settings - Fork 0
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
Date converter form #395
Conversation
copyToClipboard: () => Promise<void> | ||
} | ||
|
||
function useConverterForm(): ConverterFormParams { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
src/chronology/domain/DateBase.ts
Outdated
if (this.king?.date) { | ||
return this.getKingDate(year) | ||
} | ||
return '' |
There was a problem hiding this comment.
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.
src/chronology/domain/DateBase.ts
Outdated
this.ur3Calendar = ur3Calendar | ||
} | ||
|
||
toJulianDate(): string { |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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 [] |
There was a problem hiding this comment.
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({ |
There was a problem hiding this comment.
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[] => { |
There was a problem hiding this comment.
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 = ( |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
There was a problem hiding this 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.
There was a problem hiding this 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.
There was a problem hiding this 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.
There was a problem hiding this 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.
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. |
No description provided.