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

Fix documentation issues #230

Merged
merged 6 commits into from
Jun 27, 2024
Merged

Fix documentation issues #230

merged 6 commits into from
Jun 27, 2024

Conversation

benoitgaudou
Copy link
Contributor

Fixes attempt for issues #222, #219, #220, #214 from gama-platform.github.io repository

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 1 findings(s) 🚩
  • Improving Code Health: 6 findings(s) ✅
  • Affected Hotspots: 1 files(s) 🔥

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 9 findings(s) ✅
  • Affected Hotspots: 1 files(s) 🔥

View detailed results in CodeScene

@@ -15,6 +15,9 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

Choose a reason for hiding this comment

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

✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 9.22 to 7.77, threshold = 4

Comment on lines -777 to -778
}
return operators;

Choose a reason for hiding this comment

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

✅ Getting better: Bumpy Road Ahead
processDocXMLOperators decreases from 5 to 2 logical blocks with deeply nested code, threshold is one single block per function

Comment on lines -777 to -778
}
return operators;

Choose a reason for hiding this comment

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

✅ Getting better: Complex Method
processDocXMLOperators decreases in cyclomatic complexity from 24 to 12, threshold = 9

Comment on lines +753 to +754
private void addConcepts(org.w3c.dom.Element operator, ExecutableElement e) {
org.w3c.dom.Element conceptsElt;

Choose a reason for hiding this comment

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

❌ New issue: Code Duplication
The module contains 5 functions with similar structure: addCategories,addConcepts,processDocXMLStatementsInsideKind,processDocXMLStatementsInsideSymbol and 1 more functions

Suppress

Comment on lines -777 to -778
}
return operators;

Choose a reason for hiding this comment

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

✅ No longer an issue: Deep, Nested Complexity
processDocXMLOperators is no longer above the threshold for nested complexity depth

@lesquoyb
Copy link
Contributor

I think that's good enough for the codescene report, the only thing we could do to help with code "duplication" is to refactor completely the module to have getConcepts, getCategories and getDocElt to merge into one method. I don't think it's worth the hassle and it would probably lead to a monster of a method anyway

@lesquoyb
Copy link
Contributor

I think that's good enough for the codescene report, the only thing we could do to help with code "duplication" is to refactor completely the module to have getConcepts, getCategories and getDocElt to merge into one method. I don't think it's worth the hassle and it would probably lead to a monster of a method anyway.
There's just one thing I want you to double check for me: I commented out those lines:

			if (e.getAnnotation(doc.class) != null && !"".equals(e.getAnnotation(doc.class).deprecated())) {
				// We just omit it
			} else {

because that test was already done a few lines above, so my guess was that it was some forgotten code with no practical impact, but maybe I overlooked it and it makes sense ?

@benoitgaudou
Copy link
Contributor Author

Indeed you can remove one if :-)

@lesquoyb lesquoyb merged commit 9e9f852 into 2024-06 Jun 27, 2024
5 of 6 checks passed
@lesquoyb lesquoyb deleted the Fix-documentation-issues branch June 27, 2024 08:47
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 this pull request may close these issues.

2 participants