Colons checker in CI. #125

Merged
mdk merged 7 commits from mdk/python-docs-fr:mdk-colons into 3.11 2023-04-14 11:16:52 +00:00
1 changed files with 11 additions and 10 deletions
Showing only changes of commit fbc93b968c - Show all commits

View File

@ -149,13 +149,13 @@ spell: ensure_test_prerequisites $(DESTS)
.PHONY: line-length
line-length:
@echo "Checking all files using .scripts/line-length.py..."
@python .scripts/line-length.py *.po */*.po
@echo Checking line length...
@python .scripts/line-length.py $(SRCS)
.PHONY: sphinx-lint
sphinx-lint: ensure_test_prerequisites
@echo "Checking all files using sphinx-lint..."
@sphinx-lint --enable all --disable line-too-long *.po */*.po
@echo Checking reStructuredText syntax...
@sphinx-lint --enable all --disable line-too-long $(SRCS)
$(POSPELL_TMP_DIR)/%.po.out: %.po dict
@echo "Pospell checking $<..."
@ -168,27 +168,28 @@ fuzzy: ensure_test_prerequisites
.PHONY: check-headers
check-headers:
@grep -L '^# Copyright (C) [0-9-]*, Python Software Foundation' *.po */*.po | while read -r file;\
@echo Checking po headers...
@grep -L '^# Copyright (C) [0-9-]*, Python Software Foundation' $(SRCS) | while read -r file;\
do \
echo "Please update the po comment in $$file"; \
done
@grep -L '^"Project-Id-Version: Python 3\\n"$$' *.po */*.po | while read -r file;\
@grep -L '^"Project-Id-Version: Python 3\\n"$$' $(SRCS) | while read -r file;\
do \
echo "Please update the 'Project-Id-Version' header in $$file"; \
done
@grep -L '^"Language: fr\\n"$$' *.po */*.po | while read -r file;\
@grep -L '^"Language: fr\\n"$$' $(SRCS) | while read -r file;\
do \
echo "Please update the 'Language' header in $$file"; \
done
@grep -L '^"Language-Team: FRENCH <traductions@lists.afpy.org>\\n"' *.po */*.po | while read -r file;\
@grep -L '^"Language-Team: FRENCH <traductions@lists.afpy.org>\\n"' $(SRCS) | while read -r file;\
do \
echo "Please update the 'Language-Team' header in $$file"; \
done
.PHONY: check-colons
check-colons:
@echo "Checking all files using .scripts/check-colon.py..."
@python .scripts/check-colon.py --check *.po */*.po
@echo Checking colons...
mdk marked this conversation as resolved Outdated

limit check to $SRC after this commit?
same for long lines check?

limit check to $SRC after this commit? same for long lines check?
Outdated
Review

Super idée, c'est fait.

Super idée, c'est fait.
@python .scripts/check-colon.py --check $(SRCS)
.PHONY: verifs
verifs: spell line-length check-headers check-colons sphinx-lint