Commenting/self-descriptive code not in line with Ghidra Coding Standards for search and replace function #8392
Replies: 1 comment
-
I think you might be confusing javadoc with comment block. We strive to create javadoc for at least every public class and method, but we don't always achieve it. There is also a massive amount of older code that was held to a lower documentation standard. Note that a method with This is what a block comment is referring to: // The following code does this, than this, than this
...
...
... I personally love an use block comments all the time because IMO, the notion of what is self-documenting is very subjective, influenced heavily by the author,s intimate knowledge of the code they are writing. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The amount of commenting and self-documenting code within the search and replace function is inconsistent both internally and with the project style guide. The style guide states that there should be given preference to self-documenting code over comment blocks wherever possible. An example of this standard not being followed is the setSearchLimit on line 72 of SearchAndReplaceDialog.java has a block comment for a method that has a single line of self-documenting code. On the other hand, there are next to no block comments on other files which arguably could use them such as the loadData method on line 41 of SearchAndReplaceQuckFixTableLoader.java. This feature could be refactored for more consistency, brevity, and readability. Direct link to the feature in question https://github.com/NationalSecurityAgency/ghidra/tree/master/Ghidra/Features/Base/src/main/java/ghidra/features/base/replace
Beta Was this translation helpful? Give feedback.
All reactions