DOC: Add missing docstring error to validate_docstrings.py
State: closed

This is an update of a previous pull request -- https://github.com/pandas-dev/pandas/pull/23669
with all unrelated commits and merges removed and and updates added from code review of that pull request.

- [x] closes #23648
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Docs

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23673?src=pr&el=h1) Report
> Merging [#23673](https://codecov.io/gh/pandas-dev/pandas/pull/23673?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/6dd130a08189ce9cfebf1a49f4ba98a9721b49a8?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/23673/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/23673?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #23673   +/-   ##
=======================================
  Coverage   42.45%   42.45%           
=======================================
  Files         161      161           
  Lines       51561    51561           
=======================================
  Hits        21888    21888           
  Misses      29673    29673
```

| Flag | Coverage Δ | |
|---|---|---|
| #single | `42.45% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/23673?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/23673/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `38.7% <0%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23673?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23673?src=pr&el=footer). Last update [6dd130a...e75dd0b](https://codecov.io/gh/pandas-dev/pandas/pull/23673?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

This addresses the same issue as #23668. Can you discuss with @iway1 to see who wants to finish the work? Both PRs require some work, I don't like having all the code indented, or having the big `return` twice. I think the best would be having a separate function for the checks that just returns the errors and warnings, so we can have at the beginning:
```
if doc.missing_docstring:
    errs.append(error("GL08"))
    return errs, wrns
```
Hello @avolkov! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`scripts/tests/test_validate_docstrings.py`](https://github.com/avolkov/pandas/blob/efa728b45f9fd22d104b68e8fd6fddea0664fc62/scripts/tests/test_validate_docstrings.py) !

 - There are no PEP8 issues in the file [`scripts/validate_docstrings.py`](https://github.com/avolkov/pandas/blob/efa728b45f9fd22d104b68e8fd6fddea0664fc62/scripts/validate_docstrings.py) !


@iway1 I can finish working on the PR. I think I got the idea how to refactor the code into a separate function that handles only errs and wrns while ``validate_one`` would only handle conversion of those into output dictionary.
In this version the logic still has return statement at the top, however it is limited in scope only to the logic related to errs and wrns.
@avolkov do you have time to update based on feedback and fix the conflicts?
yes, I'll do it today

Can you please rebase? there is a conflict with master
@avolkov something went wrong when merging with master, and you've got plenty of unrelated changes. Can you fix it please?
@datapythonista It looks like I didn't properly do git rebase and the tests I wrote are failing. I'm working on it.
When we ask for a rebase, it's not literally a rebase but a `git fetch upstream && git merge upstream/master`.

If you don't find a better way, `git fetch upstream && git reset --soft upstream/master` usually works for me (it's explained in more detail here: https://datapythonista.github.io/blog/useful-git-commands.html)
There was an issue with the test ( I didn't properly remove test code for NoDoctsring class that since have been removed).  All the checks seem to be passing now.
I still see 105 commits and a huge diff. Couldn't you fix that?
Oh, ok, I see, there's another issue where I need to follow your rebase procedure. I'll do that.
@avolkov do you have time to fix this PR?
rebased
@jreback this should be ready
thanks @avolkov