diff --git a/book_header.adoc b/book_header.adoc index 2d62c32..e857dc3 100644 --- a/book_header.adoc +++ b/book_header.adoc @@ -56,15 +56,25 @@ This document is released under a Creative Commons Attribution 4.0 International //the colophon allows for a section after the preamble that is part of the frontmatter and therefore not assigned a page number. include::colophon.adoc[] + //While some documents need several levels of introductory material, other documents only need a breif introduction. You can choose to have either colophon or an overview, or to have both. //include::overview.adoc[] include::authoring.adoc[] + include::a_few_basics.adoc[] + include::tables_graphics.adoc[] + include::blocks_notes_markers.adoc[] + include::wavedrom_edit.adoc[] + include::writing.adoc[] + +include::linting.adoc[] + //please note that the index must precede the bibliography for both to work within the same book. include::index.adoc[] + include::bibliography.adoc[] diff --git a/linting.adoc b/linting.adoc new file mode 100644 index 0000000..a850d0f --- /dev/null +++ b/linting.adoc @@ -0,0 +1,14 @@ +== Linting + +The linting of code/documentation can be categorized as dealing with formatting, syntax, or semantics. Once the rules for a given project are defined, many of these rules can be checked automatically with tooling. + +=== Tooling + +link:https://pre-commit.com/[pre-commit tool] is a very useful, open source, well maintained, and popular tool/framework to help automate linting checks in general. It provides some of the following key features: + +* link:https://pre-commit.com/hooks.html[a great number of support hooks for linting] +** including direct support by many of the maintainers of best in class linters (ex: link:https://github.com/psf/black[python linter black]) +** link:https://pre-commit.com/index.html#plugins[hook plugins] allow adding these and versioning to control updates +* support for link:https://pre-commit.com/index.html#new-hooks[creating new custom hooks easily] +* can be run before `git commit` (i.e. "pre-commit") so authors can detect and fix problems sooner in the workflow +* can also be run in link:https://pre-commit.com/index.html#github-actions-example[continuous integration (CI)] to enforce checks are run for every pull request