Skip to content

Commit 25e204a

Browse files
[IMP] tests: make review UX and resource files
closes #6405 Signed-off-by: Antoine Vandevenne (anv) <[email protected]> Co-authored-by: Antoine Vandevenne (anv) <[email protected]>
1 parent 058515e commit 25e204a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,13 @@ static: $(HTML_BUILD_DIR)/_static/style.css
8686

8787
# Called by runbot for the ci/documentation_guideline check.
8888
test:
89-
@python tests/main.py $(SOURCE_DIR)/administration $(SOURCE_DIR)/applications $(SOURCE_DIR)/contributing $(SOURCE_DIR)/developer $(SOURCE_DIR)/services redirects
89+
@python tests/main.py $(SOURCE_DIR)/administration $(SOURCE_DIR)/applications $(SOURCE_DIR)/contributing $(SOURCE_DIR)/developer redirects
9090

9191
# Similar as `test`, but called only manually by content reviewers to trigger extra checks.
9292
review:
93-
@read -p "Enter content path: " path; read -p "Enter max line length (default: 100): " line_length; \
93+
@read -p "Enter relative content path: " path; read -p "Enter max line length (default: 100): " line_length; \
9494
if [ -z "$$path" ]; then echo "Error: Path cannot be empty"; exit 1; fi; \
95+
if echo $$path | grep -q 'content/'; then path=`echo $$path | sed 's|content/||'`; fi; \
9596
if [ -z "$$line_length" ]; then line_length=100; fi; \
9697
export REVIEW=1; \
9798
python tests/main.py --max-line-length=$$line_length $(SOURCE_DIR)/$$path

tests/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,5 @@ def run_additional_checks(argv=None):
8989
setattr(sphinxlint.check_line_too_long, 'enabled', True)
9090
setattr(checkers.rst_style.check_early_line_breaks, 'enabled', True)
9191
ADDITIONAL_CHECKERS.extend([checkers.resource_files.check_image_color_depth])
92+
run_additional_checks()
9293
sys.exit(sphinxlint.main())

0 commit comments

Comments
 (0)