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

refactor: Improve QueryFileDefaults data maintainability #3315

Merged
merged 14 commits into from
Feb 8, 2025

Conversation

claremacrae
Copy link
Collaborator

Types of changes

Internal changes:

  • Refactor (prefix: refactor - non-breaking change which only improves the design or structure of existing code, and making no changes to its external behaviour)

Description

Convert a bunch of function calls to a data structure in QueryFileDefaults.ts.

Motivation and Context

I am going to need to add more data, like the types of the properties.

This will allow more code to be generated via data, simplifying maintenance.

How has this been tested?

Running existing tests.

Checklist

  • My code follows the code style of this project and passes yarn run lint.
  • My change has adequate Unit Test coverage.

Terms

@claremacrae claremacrae added type: internal Only regards development or contributing scope: frontmatter Anything to do with YAML frontmatter, also known as Obsidian properties labels Feb 8, 2025
Copy link

sonarqubecloud bot commented Feb 8, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
71.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@claremacrae
Copy link
Collaborator Author

SonarCloud is failing the code because of the repetition of values in the new data structure.
Technically it's correct, of course, but this change is being simplify maintenance, and I am very comfortable with this duplication....

So am going to merge it anyway.

@claremacrae claremacrae merged commit 6156ea4 into main Feb 8, 2025
3 of 4 checks passed
@claremacrae claremacrae deleted the refactor-query-file-defaults branch February 8, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: frontmatter Anything to do with YAML frontmatter, also known as Obsidian properties type: internal Only regards development or contributing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant