Skip to content

fix: handle missing fields gracefully and prevent infinite recursion … - #259

Open
matthv wants to merge 1 commit into
mainfrom
fix/improve-logs
Open

fix: handle missing fields gracefully and prevent infinite recursion …#259
matthv wants to merge 1 commit into
mainfrom
fix/improve-logs

Conversation

@matthv

Copy link
Copy Markdown
Member

…in schema generation

Definition of Done

General

  • Write an explicit title for the Pull Request, following Conventional Commits specification
  • Test manually the implemented changes
  • Validate the code quality (indentation, syntax, style, simplicity, readability)

Security

  • Consider the security impact of the changes made

@qltysh

qltyshBot commented Feb 5, 2026

Copy link
Copy Markdown

11 new issues

ToolCategoryRuleCount
qltyStructureFunction with high complexity (count = 7): check_many_to_many_published?5
qltyStructureFunction with many returns (count = 6): published?3
qltyDuplicationFound 19 lines of similar code in 2 locations (mass = 93)2
qltyStructureFunction with many parameters (count = 4): log_missing_relation_field1

end
end

def log_missing_relation_field(collection_name, field_name, field_type, relation_name)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function with many parameters (count = 4): log_missing_relation_field [qlty:function-parameters]

end
return check_many_to_many_published?(field, visited) if field.type == 'ManyToMany'

true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function with many returns (count = 6): published? [qlty:return-statements]

return false
end

published?(field.origin_key_target, visited)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function with many returns (count = 4): check_one_to_x_published? [qlty:return-statements]

through_collection.published?(field.foreign_key, visited) &&
through_collection.published?(field.origin_key, visited) &&
published?(field.origin_key_target, visited) &&
foreign_collection.published?(field.foreign_key_target, visited)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Found 2 issues:

1. Function with many returns (count = 6): check_many_to_many_published? [qlty:return-statements]


2. Function with high complexity (count = 7): check_many_to_many_published? [qlty:function-complexity]

Sign up for freeto 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

@matthv