1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tools: implement v missdoc --diff oldv newv (#14537)

This commit is contained in:
Larpon
2022-05-27 17:19:06 +02:00
committed by GitHub
parent 52a3e5e780
commit f3e7f24ee6
4 changed files with 163 additions and 39 deletions

View File

@@ -21,7 +21,7 @@ jobs:
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/
MOPTIONS: --relative-paths --exclude /vlib/v/ --exclude /builtin/linux_bare/ --exclude /testdata/ --exclude /tests/
steps:
- uses: actions/checkout@v2
- name: Build V
@@ -35,14 +35,4 @@ jobs:
- name: Check against parent commit
run: |
./v missdoc $MOPTIONS | sort > /tmp/n_v.txt
cd pv/ && ../v missdoc $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) are introduced with no documentation:"
diff /tmp/n_v.txt /tmp/o_v.txt ## diff does exit(1) when files are different
fi
./v missdoc --diff $MOPTIONS pv/vlib vlib