Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/doc8: add checker to ci.mk #50

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/templates/misc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,13 @@ jobs:
fetch-depth: 0
- run: >
make yamllint

docformat:
runs-on: ubuntu-latest
container: baoproject/bao:latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- run: make rst-format
19 changes: 18 additions & 1 deletion ci.mk
Original file line number Diff line number Diff line change
Expand Up @@ -340,5 +340,22 @@ endef

#############################################################################

ci=$(eval $(call $1, $2, $3, $4, $5, $6, $7, $8, $9))
# reST Formatting
# Provides one make target:
# make rst-format # checks if the provided reST files are formated correctly
# @param root folder that contains the reST files
# @example $(call ci, rstformat, /path/to/doc/folder)

rst-format:
@doc8 $(_path_rst_files) --ignore D000

.PHONY: rst-format
non_build_targets+=rst-format

define rstformat
_path_rst_files+=$1
endef

#############################################################################

ci=$(eval $(call $1, $2, $3, $4, $5, $6, $7, $8, $9))