Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb235419

Browse files
committed
refactor: optimize Vale style checking in Makefile
- Restructure Makefile Vale style checking to match GitHub Actions pattern- Improve changed file detection and variable handling- Enhance error handling with proper redirection and status messages
1 parentd77fdf2 commitb235419

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

‎Makefile‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -532,17 +532,23 @@ lint/docs-style: node_modules/.installed
532532
@if ["$(DOCS_MD_FILES)"-gt 0 ];then\
533533
echo"$(GREEN)==>$(RESET)$(BOLD)lint/docs-style$(RESET)";\
534534
ifcommand -v vale>/dev/null2>&1;then \
535+
# Determine files to check
536+
VALE_FILES="docs/README.md docs/index.md";\
535537
ifecho"$(MAKEFLAGS)"| grep -q"all";then \
536538
echo"Checking all documentation files...";\
537-
vale --no-exit --config=.github/docs/vale/.vale.ini docs/;\
539+
VALE_FILES="docs/";\
540+
elif [-n"$(DOCS_CHANGED_FILES)" ];then\
541+
echo"Checking changed files only:$(DOCS_CHANGED_FILES)";\
542+
VALE_FILES="$(DOCS_CHANGED_FILES)";\
538543
else\
539-
if [-n"$(DOCS_CHANGED_FILES)" ];then \
540-
echo"Checking changed files only:$(DOCS_CHANGED_FILES)";\
541-
vale --no-exit --config=.github/docs/vale/.vale.ini$(DOCS_CHANGED_FILES);\
542-
else\
543-
echo"No changed files detected, checking representative files...";\
544-
vale --no-exit --config=.github/docs/vale/.vale.ini docs/README.md docs/index.md2>/dev/null||echo"No representative files found";\
545-
fi;\
544+
echo"No changed files detected, checking representative files...";\
545+
fi;\
546+
# Run Vale on the determined files
547+
if [-n"$$VALE_FILES" ];then \
548+
vale --no-exit --config=.github/docs/vale/.vale.ini$$VALE_FILES2>/dev/null||\
549+
echo"Warning: Some vale checks produced issues";\
550+
else\
551+
echo"No files found to check";\
546552
fi;\
547553
else\
548554
echo"Vale is an optional tool for style checking.";\

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp