Skip to content

(docs): run doctoc on pre-commit#399

Merged
jaredpalmer merged 1 commit into
jaredpalmer:masterfrom
agilgur5:doctoc-precommit
Dec 29, 2019
Merged

(docs): run doctoc on pre-commit#399
jaredpalmer merged 1 commit into
jaredpalmer:masterfrom
agilgur5:doctoc-precommit

Conversation

@agilgur5

@agilgur5 agilgur5 commented Dec 27, 2019

Copy link
Copy Markdown
Collaborator
  • and install it as a devDep

  • doctoc is used in the README ToC and listed in comment, but wasn't
    a devDep or used in any internal scripts

Follow-up to #397 . Please merge after that one and after #398 , which I split out from this PR.

The big thing that's not so helpful about running doctoc on pre-commit as that it won't abort the commit if changes were made. It just adds new changes, but those haven't been staged yet so won't be included in the commit (unless you amend them in). Not sure what a better method may be that isn't overly complex 😕

- and install it as a devDep

- doctoc is used in the README ToC and listed in comment, but wasn't
  a devDep or used in any internal scripts
@swyxio

swyxio commented Dec 28, 2019

Copy link
Copy Markdown
Collaborator

how bout doing this via github action?

@jaredpalmer jaredpalmer merged commit f338613 into jaredpalmer:master Dec 29, 2019
@agilgur5

agilgur5 commented Dec 31, 2019

Copy link
Copy Markdown
Collaborator Author

ah so looks like this is a known issue of doctoc: thlorenz/doctoc#169, thlorenz/doctoc#161 . Could use that PR branch and run it with the code --stdout code listed which would be ideal

But, in general, doctoc isn't really maintained, so it might just make sense to look for an alternative instead of hacking around with it.


re: GitHub Action -- a GH Action wouldn't prevent errors like those in #307 from getting in, it would just fix them with an additional commit after; better to nip it in the bud beforehand imo.

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.

3 participants