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

RenameSuggestion #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AnonymousAccount4SE
Copy link

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 a non-descriptive method name in your repository:

/* Non-descriptive Method Name in publications-rest/src/main/java/scot/gov/publications/metadata/Metadata.java */
    public boolean shoudlEmbargo() {

        // we never need to embargo a publications whose publication date is in the past
        if (publicationDate.isBefore(LocalDateTime.now())) {
            return false;
        }

        // if the sensitive flag is set or if this is an embargo type then we should embargo it.
        return isSensitive() || typeMapper.isEmbargoType(publicationType);
    }

We considered "shoudlEmbargo" as non-descriptive because it contains typo, i.e., "shoudl" -> "should". We have corrected it and submitted a pull request.

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.

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.

1 participant