diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..7d3ca2218 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,2 @@ +[codespell] +ignore-words-list = crate \ No newline at end of file diff --git a/Makefile b/Makefile index 50741cf76..e96564029 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,9 @@ eq = $(if $(or $(1),$(2)),$(and $(findstring $(1),$(2)),\ book: book.build +codespell: book.codespell + + fmt: cargo.fmt @@ -137,6 +140,15 @@ book.build: mdbook build book/ $(if $(call eq,$(out),),,-d $(out)) +# Spellcheck Book. +# +# Usage: +# make book.codespell [fix=(no|yes)] + +book.codespell: + codespell book/ $(if $(call eq,$(fix),yes),--write-changes,) + + # Serve Book on some port. # # Usage: @@ -180,8 +192,8 @@ graphql-playground: # .PHONY section # ################## -.PHONY: book fmt lint release test \ - book.build book.serve \ +.PHONY: book codespell fmt lint release test \ + book.build book.codespell book.serve \ cargo.fmt cargo.lint cargo.release cargo.test \ graphiql graphql-playground \ test.book test.cargo