Dashjoin Is an Open Source & Cloud Native Low Code Development and Integration Platform that helps teams deliver applications faster 🚀 Uses a data-driven approach inspired by Linked Data to make use of your existing assets
Renaming Suggestion of Method Names to Make Them More Descriptive
Description
We have developed a tool (NameSpotter) for identifying non-descriptive method names, and using this tool we find several non-descriptive method names in your repository:
/* Non-descriptive Method Name in dashjoin-core/src/main/java/org/dashjoin/function/ERDiagram.java */
String s(String s) {
if (s == null)
return "";
else
return s;
}
We considered "s" as non-descriptive because it only contains one letter.
We proposed renaming the method name to "getStringSafely". Consequently, when we look at this method name, we will be informed that this method is designed to get string safely without causing NullPointerException.
String q(String s) {
if (s == null)
return null;
if (StringUtils.isAlphanumeric(s.replace('_', 'a')))
return s;
else
return '"' + s + '"';
}
We considered "q" as non-descriptive because it also only contains one letter.
We proposed renaming the method name to "isAlphanumeric", which reminds developers that this method implements functions related to an API method (StringUtils.isAlphanumeric).
String t(String s) {
if (s == null)
return null;
return s.replaceAll(" ", "_");
}
We considered "t" as non-descriptive because it also only contains one letter.
We proposed renaming the method name to "replaceSpaceWithUnderScore", which explicitly delivers the main function of this method.
Do you agree with the judgment?
If not, could you please leave your valuable opinion?
If you do agree, the relevant modification has been submitted as a PR, and thanks for your precious time to consider it.
Renaming Suggestion of Method Names to Make Them More Descriptive
Description
We have developed a tool (NameSpotter) for identifying non-descriptive method names, and using this tool we find several non-descriptive method names in your repository:
We considered "s" as non-descriptive because it only contains one letter. We proposed renaming the method name to "getStringSafely". Consequently, when we look at this method name, we will be informed that this method is designed to get string safely without causing NullPointerException.
We considered "q" as non-descriptive because it also only contains one letter. We proposed renaming the method name to "isAlphanumeric", which reminds developers that this method implements functions related to an API method (StringUtils.isAlphanumeric).
We considered "t" as non-descriptive because it also only contains one letter. We proposed renaming the method name to "replaceSpaceWithUnderScore", which explicitly delivers the main function of this method.
Do you agree with the judgment?
If not, could you please leave your valuable opinion?
If you do agree, the relevant modification has been submitted as a PR, and thanks for your precious time to consider it.