Add remaining ToCs to ToC lint (#56487)

Summary:
The lint was originally added in https://github.com/pytorch/pytorch/issues/54974, but at the time I didn't realize that these other Markdown files also each have a table of contents:

- `GLOSSARY.md`
- `torch/csrc/jit/OVERVIEW.md`
- `torch/csrc/jit/docs/serialization.md`
- `torch/fx/OVERVIEW.md`

This PR adds those files to the lint, and also changes the rule from using a fixed list of filenames to a `git grep` command that finds all Markdown files containing this magic comment:

```md

```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/56487

Test Plan: The "Lint / toc" job in GitHub Actions.

Reviewed By: janeyx99

Differential Revision: D27884885

Pulled By: samestep

fbshipit-source-id: 5462437502b17fba93abf5098e21754bf566a4fe
This commit is contained in:
Sam Estep
2021-04-20 10:27:02 -07:00
committed by Facebook GitHub Bot
parent 062e70590c
commit 75651e3cc4
5 changed files with 38 additions and 27 deletions

View File

@ -1,6 +1,7 @@
# PyTorch Glossary
- [PyTorch Glossary](#pytorch-glossary)
<!-- toc -->
- [Operation and Kernel](#operation-and-kernel)
- [ATen](#aten)
- [Operation](#operation)
@ -19,6 +20,8 @@
- [Tracing](#tracing)
- [Scripting](#scripting)
<!-- tocstop -->
# Operation and Kernel
## ATen