Showing 1,408 of 1,408 total issues
Function useH3ContextualData
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
const useH3ContextualData = <T = H3APIResponse>(
id: Layer['id'],
options?: UseQueryOptions<
H3APIResponse,
ErrorResponse,
Function IsSmallerOrEqualThan
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function IsSmallerOrEqualThan(
property: string,
validationOptions?: ValidationOptions,
) {
return (object: Record<string, any>, propertyName: string): void => {
Function IsGreaterOrEqualThan
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function IsGreaterOrEqualThan(
property: string,
validationOptions?: ValidationOptions,
) {
return (object: Record<string, any>, propertyName: string): void => {
Function defaultMessage
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
defaultMessage(args: ValidationArguments): string {
if (
(args.object as SourcingDataExcelValidator).location_type ===
LOCATION_TYPES.UNKNOWN ||
(args.object as SourcingDataExcelValidator).location_type ===
Function getImpactTable
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
async getImpactTable(
impactTableDto: GetImpactTableDto,
fetchSpecification: FetchSpecification,
): Promise<PaginatedImpactTable> {
const indicators: Indicator[] =
Function serializerConfig
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
get serializerConfig(): JSONAPISerializerConfig<ScenarioIntervention> {
return {
attributes: [
'title',
'description',
Function processDataForComparison
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
static processDataForComparison(
impactTableData: ImpactTableData[],
): ActualVsScenarioImpactTableData[] {
// Separate the data into different maps depending on whether data is from a scenario or not
const actualData: Map<string, ActualVsScenarioImpactTableData> = new Map();
Function getClosestAdminRegionByCoordinates
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
async getClosestAdminRegionByCoordinates(
coordinates: {
lng: number;
lat: number;
},
Function getAlertSummary
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
async getAlertSummary(dto: any): Promise<EUDRAlertDatabaseResult[]> {
const bigQueryBuilder: BigQueryAlertsQueryBuilder =
this.createQueryBuilder(dto);
bigQueryBuilder
.from(this.baseDataset, 'alerts')
Function getLocationTypes
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
async getLocationTypes(
locationTypesOptions: GetLocationTypesDto,
): Promise<LocationTypesDto> {
if (locationTypesOptions.supported) {
return this.getAllSupportedLocationTypes({
Function getActualVsScenarioImpactTable
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
async getActualVsScenarioImpactTable(
dto: GetActualVsScenarioImpactTableDto,
fetchSpecification: FetchSpecification,
): Promise<ActualVsScenarioPaginatedImpactTable> {
const indicators: Indicator[] =
Similar blocks of code found in 2 locations. Consider refactoring. Open
const { data: t1SupplierOptions, isLoading: t1SupplierOptionsIsLoading } = useSuppliersTypes(
{
type: 't1supplier',
producerIds,
materialIds,
- 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 59.
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
const {
register: registerPassword,
handleSubmit: handleSubmitPassword,
formState: { errors },
} = useForm<yup.InferType<typeof passwordSchemaValidation>>({
- 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 59.
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
() =>
apiService
.request({
method: 'GET',
url: `/scenario-interventions/${interventionId}`,
- 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 59.
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
const {
register,
handleSubmit,
formState: { errors },
} = useForm<yup.InferType<typeof schemaValidation>>({
- 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 59.
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
const queryBuilder: SelectQueryBuilder<H3Data> = this.dataSource
.createQueryBuilder()
.select(' h3data.*')
.from(H3Data, 'h3data')
.leftJoin('indicator', 'indicator', 'h3data.indicatorId = indicator.id')
- 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 59.
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
() =>
apiService
.request({
method: 'GET',
url: `/scenarios/${scenarioId}/interventions`,
- 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 59.
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
const queryBuilder: SelectQueryBuilder<H3Data> = this.dataSource
.createQueryBuilder()
.select('h3data.*')
.from(H3Data, 'h3data')
.leftJoin(
- 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 59.
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
const { data: producerOptions, isLoading: producerOptionsIsLoading } = useSuppliersTypes(
{
type: 'producer',
t1SupplierIds,
materialIds,
- 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 59.
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 labelSelect
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
const labelSelect = useMemo(() => {
if (isArray(selected) && selected?.[0]?.label) {
return (
<div className="flex flex-wrap gap-2">
{(sortBy(selected, ['label']) as Option<T>[] | Option<string>[]).map((option) => (