Skip to content

[doc fix and add test]fix documentation in prime and strong number #593

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

Merged
merged 2 commits into from
Aug 15, 2020
Merged

Conversation

realDuYuanChao
Copy link
Member

@realDuYuanChao realDuYuanChao commented Aug 11, 2020

Description of Change

  • fix doc
  • add test

References

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:

@realDuYuanChao realDuYuanChao requested a review from kvedala August 11, 2020 15:11
@kvedala
Copy link
Collaborator

kvedala commented Aug 12, 2020

Same change for the other file and also to the main function.

@realDuYuanChao
Copy link
Member Author

Same change for the other file and also to the main function.

I did. Please review again :)

@kvedala
Copy link
Collaborator

kvedala commented Aug 12, 2020

Change not applied to the documentation of main functions. Please add the @return None line to the docstring

@realDuYuanChao
Copy link
Member Author

Change not applied to the documentation of main functions. Please add the @return None line to the docstring

Do you mean like this ?

/**
 *Driver Code
 *@return None
*/
int main()
{
    return 0;
}

@kvedala
Copy link
Collaborator

kvedala commented Aug 13, 2020

Change not applied to the documentation of main functions. Please add the @return None line to the docstring

Do you mean like this ?

/**
 *Driver Code
 *@return None
*/
int main()
{
    return 0;
}

yes 👍

@realDuYuanChao
Copy link
Member Author

I did this as you say. But I don't know why need add @return None to main function. Because main return 0 to OS. @kvedala

@kvedala
Copy link
Collaborator

kvedala commented Aug 14, 2020

I did this as you say. But I don't know why need add @return None to main function. Because main return 0 to OS. @kvedala

it is only for the documentation generator. The generator ignored the functions if the doctoring does not contain a @return or @param tags. Please correct that to 0 for main as needed. Thanks, good catch.

@realDuYuanChao
Copy link
Member Author

Can I merge this branch?

@realDuYuanChao realDuYuanChao merged commit 1a13794 into TheAlgorithms:master Aug 15, 2020
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