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 ContentFunctionsDescriptor fieldsAndTerms method #2456

Open
apmoriarty opened this issue Jul 1, 2024 · 0 comments · May be fixed by #2551
Open

Refactor ContentFunctionsDescriptor fieldsAndTerms method #2456

apmoriarty opened this issue Jul 1, 2024 · 0 comments · May be fixed by #2551
Assignees

Comments

@apmoriarty
Copy link
Collaborator

SonarLint flags the fieldsAndTerms method in the ContentFunctionsDescriptor at a cognitive complexity of 97. The ideal target is 15.

There is some pre-computation work that doesn't need to happen until later, if at all.

Realistically a record-style object that contains a set of fields and a set of values is all that's needed. An array of sets is weird, but works for now.

@lbschanno lbschanno self-assigned this Sep 6, 2024
lbschanno added a commit that referenced this issue Sep 9, 2024
Refactor the method ContentFunctionsDescriptor.fieldsAndTerms() to
reduce the cognitive complexity as measured by SolarLint from 97 to
within the target of 15.

Fixes #2456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants