diff --git a/.github/workflows/docs_ci.yml b/.github/workflows/docs_ci.yml index 703d635004..8422e25b7d 100644 --- a/.github/workflows/docs_ci.yml +++ b/.github/workflows/docs_ci.yml @@ -14,12 +14,14 @@ jobs: run: make - name: Check markdown line length & code examples run: ./v check-md -hide-warnings . - ## NB: -hide-warnings is used here, so that the output is less noisy, - ## thus real errors are easier to spot. + ## NB: -hide-warnings is used here, so that the output is less noisy, + ## thus real errors are easier to spot. report-missing-fn-doc: runs-on: ubuntu-20.04 timeout-minutes: 5 + env: + MOPTIONS: --no-line-numbers --relative-paths --exclude /vlib/v/ --exclude /builtin/linux_bare/ --exclude /testdata/ --exclude /tests/ vlib/ steps: - uses: actions/checkout@v2 - name: Build V @@ -33,14 +35,14 @@ jobs: - name: Check against parent commit run: | - ./v run cmd/tools/missdoc.v --no-line-numbers vlib/ | sed -n 's@^.*/vlib/@vlib/@p' | sort > /tmp/n_v.txt - ./v run cmd/tools/missdoc.v --no-line-numbers pv/vlib/ | sed -n 's@^.*/vlib/@vlib/@p' | sort > /tmp/o_v.txt + ./v run cmd/tools/missdoc.v $MOPTIONS | sort > /tmp/n_v.txt + cd pv/ && ../v run ../cmd/tools/missdoc.v $MOPTIONS | sort > /tmp/o_v.txt count_new=$(cat /tmp/n_v.txt | wc -l) count_old=$(cat /tmp/o_v.txt | wc -l) echo "new pubs: $count_new | old pubs: $count_old" echo "new head: $(head -n1 /tmp/n_v.txt)" echo "old head: $(head -n1 /tmp/o_v.txt)" if [[ ${count_new} -gt ${count_old} ]]; then - echo "The following $((count_new-count_old)) function(s) is introduced with no documentation:" + echo "The following $((count_new-count_old)) function(s) are introduced with no documentation:" diff /tmp/n_v.txt /tmp/o_v.txt ## diff does exit(1) when files are different fi diff --git a/cmd/tools/missdoc.v b/cmd/tools/missdoc.v index c93bf9e8e2..51f8ac6354 100644 --- a/cmd/tools/missdoc.v +++ b/cmd/tools/missdoc.v @@ -158,7 +158,6 @@ fn main() { exclude: fp.string_multi('exclude', `e`, '') relative_paths: fp.bool('relative-paths', `r`, false, 'Use relative paths in output.') } - dump(opt) if opt.show_help { println(fp.usage()) exit(0)