Showing 459 of 459 total issues
Function StorageIntegrations
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function StorageIntegrations() {
const fileStorageDomainMessages = useDomainMessages(
LANG_DOMAINS.INTEGRATIONS.FILE_STORAGE
);
useSetPageDetails({
Function crudEnabledValidationImpl
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const crudEnabledValidationImpl: ValidationImplType<void> = async (
req,
action: unknown
) => {
progammingError("Please provide the action for the CRUD check", !action);
Function defaultWidgets
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
.map(async (entity, index) => {
const dateField =
await this._entitiesApiService.getEntityFirstFieldType(
entity.value,
"date"
Function listData
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
async listData(
entity: string,
searchValue?: string
): Promise<{ value: string; label: string }[]> {
const [relationshipSettings, primaryField] = await Promise.all([
Function FormSelect
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function FormSelect(formInput: IFormSelect) {
const {
input,
selectData,
meta,
Function filterOperatorToQuery
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
filterOperatorToQuery(
query: T,
column: string,
{ operator, value, value2 }: IColumnFilterBag<unknown>,
groupOperator: "and" | "or"
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function AsyncFormSelect
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function AsyncFormSelect(props: IProps) {
const { _ } = useLingui();
const { input, url, referenceUrl } = props;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function EntityRelationDetails
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function EntityRelationDetails() {
const childEntity = useRouteParam("childEntity");
const childEntityCrudConfig = useEntityCrudConfig(childEntity);
const entityId = useEntityId();
const parentEntity = useEntitySlug();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function AccountProfile
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function AccountProfile() {
const authenticatedUserBag = useAuthenticatedUserBag();
const updateProfileMutation = useUpdateProfileMutation();
const domainMessages = useDomainMessages(LANG_DOMAINS.ACCOUNT.PROFILE);
Function useTableState
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useTableState = (
contextKey: string,
persistentFilters: IDataTableProps["persistentFilters"],
defaultTableState?: IDataTableProps["defaultTableState"]
) => {
Function create
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
async create(
entity: string,
data: Record<string, unknown>,
accountProfile: IAccountProfile
): Promise<string | number> {
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { error } = this.state;
const { children } = this.props;
if (error) {
return (
Function GET
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
GET: async (): Promise<Record<string, string>> => {
const latestVersion$1 = await latestVersion("dashpress");
const versionText =
latestVersion$1 === version
Similar blocks of code found in 3 locations. Consider refactoring. Open
tokenValidityDurationInDays: {
label: msg`Token Validity Duration In Days`,
type: "number",
validations: [
{
- 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 56.
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 3 locations. Consider refactoring. Open
singular: {
label: msg`Singular`,
type: "text",
validations: [
{
- 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 56.
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 3 locations. Consider refactoring. Open
plural: {
label: msg`Plural`,
type: "text",
validations: [
{
- 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 56.
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 createConfigDomainPersistenceService
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function createConfigDomainPersistenceService<T>(
configDomain: ConfigDomain
): AbstractConfigDataPersistenceService<T> {
const configBag: Record<
ConfigAdaptorTypes,
Function showData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
async showData(
entity: string,
id: string | number,
column?: string
): Promise<Record<string, unknown>> {
Function getEntitySelections
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getEntitySelections = (
entityFields: IEntityField[],
entitySelections: Record<string, IColorableSelection[]>,
entityFieldTypes: Record<string, FormFieldTypes>
): Record<string, IColorableSelection[]> => {
Similar blocks of code found in 2 locations. Consider refactoring. Open
await this._credentialsApiService.upsertGroup(
{
key: this.makeCredentialsGroupKey(storageKey),
fields: typescriptSafeObjectDotKeys(
STORAGE_INTEGRATIONS[storageKey].integrationConfigurationSchema
- 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 55.
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