Skip to content

Commit 8078b54

Browse files
committed
Add validation to manual_lint.js to check for spaces in filenames
1 parent a128e48 commit 8078b54

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/manual_lint.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ async function main() {
1212
var data = await fs.readFile(filePath, 'utf8');
1313
var filename = path.parse(filePath).base.replace(".md","");
1414

15+
if (filename.includes(' ')) {
16+
errors.push(`文件 ${filePath} 不符合仓库的规范!文件名不能包含空格!`);
17+
}
18+
1519
dataLines = data.split('\n').map(t => t.trim());
1620
titles = dataLines.filter(t => t.startsWith('#'));
1721
secondTitles = titles.filter(t => t.startsWith('## '));

0 commit comments

Comments
 (0)