[IMP] tests: make review UX and resource files
closes odoo/documentation#6433
X-original-commit: 25e204adcd
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Samuel Lieber (sali) <sali@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
parent
5d840a56d7
commit
0336359c57
5
Makefile
5
Makefile
@ -86,12 +86,13 @@ static: $(HTML_BUILD_DIR)/_static/style.css
|
||||
|
||||
# Called by runbot for the ci/documentation_guideline check.
|
||||
test:
|
||||
@python tests/main.py $(SOURCE_DIR)/administration $(SOURCE_DIR)/applications $(SOURCE_DIR)/contributing $(SOURCE_DIR)/developer $(SOURCE_DIR)/services redirects
|
||||
@python tests/main.py $(SOURCE_DIR)/administration $(SOURCE_DIR)/applications $(SOURCE_DIR)/contributing $(SOURCE_DIR)/developer redirects
|
||||
|
||||
# Similar as `test`, but called only manually by content reviewers to trigger extra checks.
|
||||
review:
|
||||
@read -p "Enter content path: " path; read -p "Enter max line length (default: 100): " line_length; \
|
||||
@read -p "Enter relative content path: " path; read -p "Enter max line length (default: 100): " line_length; \
|
||||
if [ -z "$$path" ]; then echo "Error: Path cannot be empty"; exit 1; fi; \
|
||||
if echo $$path | grep -q 'content/'; then path=`echo $$path | sed 's|content/||'`; fi; \
|
||||
if [ -z "$$line_length" ]; then line_length=100; fi; \
|
||||
export REVIEW=1; \
|
||||
python tests/main.py --max-line-length=$$line_length $(SOURCE_DIR)/$$path
|
||||
|
@ -89,4 +89,5 @@ if __name__ == '__main__':
|
||||
setattr(sphinxlint.check_line_too_long, 'enabled', True)
|
||||
setattr(checkers.rst_style.check_early_line_breaks, 'enabled', True)
|
||||
ADDITIONAL_CHECKERS.extend([checkers.resource_files.check_image_color_depth])
|
||||
run_additional_checks()
|
||||
sys.exit(sphinxlint.main())
|
||||
|
Loading…
Reference in New Issue
Block a user