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

Commitbe20161

Browse files
committed
make fmt
1 parent1febdcc commitbe20161

File tree

2 files changed

+148
-148
lines changed

2 files changed

+148
-148
lines changed

‎.github/docs/testing/test-megalinter.sh‎

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ echo "------------------------------------------------------"
77

88
# Function to clean up on exit
99
cleanup() {
10-
echo"Cleaning up..."
11-
rm -rf"$TEMP_DIR"
10+
echo"Cleaning up..."
11+
rm -rf"$TEMP_DIR"
1212
}
1313

1414
# Create temporary directory
@@ -30,7 +30,7 @@ cp -r ".github/docs/config/.markdownlint.yml" "$CONFIG_DIR/"
3030
cp -r".github/docs/vale""$TEMP_DIR/.github/docs/"
3131

3232
# Create a sample markdown file with issues
33-
cat>"$DOCS_DIR/sample.md"<<EOF
33+
cat>"$DOCS_DIR/sample.md"<<EOF
3434
# Sample Document for Testing
3535
3636
This is a simple document for testing MegaLinter integration.
@@ -53,38 +53,38 @@ Here's a reference to a [non-existent document](nonexistent.md).
5353
EOF
5454

5555
# Create mock changed files list
56-
echo'["docs/sample.md"]'>"$TEMP_DIR/changed_files.json"
56+
echo'["docs/sample.md"]'>"$TEMP_DIR/changed_files.json"
5757

5858
echo"=== PHASE 1: Testing markdownlint ==="
5959
echo"-----------------------------------------"
6060

61-
ifcommand -v markdownlint-cli2&>/dev/null;then
62-
echo"Testing markdownlint-cli2 on sample document..."
63-
pnpmexec markdownlint-cli2"$DOCS_DIR/sample.md"||echo"✅ Found markdown issues as expected"
61+
ifcommand -v markdownlint-cli2&>/dev/null;then
62+
echo"Testing markdownlint-cli2 on sample document..."
63+
pnpmexec markdownlint-cli2"$DOCS_DIR/sample.md"||echo"✅ Found markdown issues as expected"
6464
else
65-
echo"⚠️ markdownlint-cli2 not available, skipping test"
65+
echo"⚠️ markdownlint-cli2 not available, skipping test"
6666
fi
6767

6868
echo
6969
echo"=== PHASE 2: Testing Vale ==="
7070
echo"-----------------------------"
7171

72-
ifcommand -v vale&>/dev/null;then
73-
echo"Testing Vale on sample document..."
74-
vale --output=line --config=".github/docs/vale/.vale.ini""$DOCS_DIR/sample.md"||echo"✅ Found style issues as expected"
72+
ifcommand -v vale&>/dev/null;then
73+
echo"Testing Vale on sample document..."
74+
vale --output=line --config=".github/docs/vale/.vale.ini""$DOCS_DIR/sample.md"||echo"✅ Found style issues as expected"
7575
else
76-
echo"⚠️ Vale not available, skipping test"
76+
echo"⚠️ Vale not available, skipping test"
7777
fi
7878

7979
echo
8080
echo"=== PHASE 3: Testing markdown-link-check ==="
8181
echo"--------------------------------------------"
8282

83-
ifcommand -v markdown-link-check&>/dev/null;then
84-
echo"Testing markdown-link-check on sample document..."
85-
markdown-link-check"$DOCS_DIR/sample.md"||echo"✅ Found link issues as expected"
83+
ifcommand -v markdown-link-check&>/dev/null;then
84+
echo"Testing markdown-link-check on sample document..."
85+
markdown-link-check"$DOCS_DIR/sample.md"||echo"✅ Found link issues as expected"
8686
else
87-
echo"⚠️ markdown-link-check not available, skipping test"
87+
echo"⚠️ markdown-link-check not available, skipping test"
8888
fi
8989

9090
echo
@@ -93,23 +93,23 @@ echo "--------------------------------------------------"
9393

9494
# Create a function to simulate the cross-reference validation logic
9595
check_cross_references() {
96-
local docs_dir="$1"
97-
98-
echo"Checking cross-references in$docs_dir..."
99-
100-
# Check for broken internal links
101-
forfilein"$docs_dir"/*.md;do
102-
echo"Checking$file for broken references..."
103-
# Extract markdown links that aren't http/https
104-
if grep -q -E'\[[^]]+\]\(nonexistent.md\)'"$file";then
105-
echo"Found broken reference to nonexistent.md in$file"
106-
echo"✅ Found cross-reference issues as expected"
107-
return 0
108-
fi
109-
done
110-
111-
echo"❌ No cross-reference issues found when issues were expected"
112-
return 1
96+
local docs_dir="$1"
97+
98+
echo"Checking cross-references in$docs_dir..."
99+
100+
# Check for broken internal links
101+
forfilein"$docs_dir"/*.md;do
102+
echo"Checking$file for broken references..."
103+
# Extract markdown links that aren't http/https
104+
if grep -q -E'\[[^]]+\]\(nonexistent.md\)'"$file";then
105+
echo"Found broken reference to nonexistent.md in$file"
106+
echo"✅ Found cross-reference issues as expected"
107+
return 0
108+
fi
109+
done
110+
111+
echo"❌ No cross-reference issues found when issues were expected"
112+
return 1
113113
}
114114

115115
# Run cross-reference check
@@ -125,4 +125,4 @@ echo "2. Vale style checking"
125125
echo"3. Link validation"
126126
echo"4. Cross-reference checking"
127127
echo
128-
echo"The workflow is properly configured to use standardized tools through MegaLinter's documentation flavor"
128+
echo"The workflow is properly configured to use standardized tools through MegaLinter's documentation flavor"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp