Skip to content

Commit c06d0ec

Browse files
committed
run 'file name must be lower cased' syntax test on all* files
- except some .md files and mathjax dist/extras/
1 parent 69472f6 commit c06d0ec

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

tasks/test_syntax.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,36 @@ function assertSrcContents() {
9090

9191
// check that all file names are in lower case
9292
function assertFileNames() {
93+
var pattern = combineGlobs([
94+
path.join(constants.pathToRoot, '*.*'),
95+
path.join(constants.pathToSrc, '**/*.*'),
96+
path.join(constants.pathToLib, '**/*.*'),
97+
path.join(constants.pathToDist, '**/*.*'),
98+
path.join(constants.pathToRoot, 'test', '**/*.*'),
99+
path.join(constants.pathToRoot, 'tasks', '**/*.*'),
100+
path.join(constants.pathToRoot, 'devtools', '**/*.*')
101+
]);
102+
93103
var logs = [];
94104

95-
glob(combineGlobs([srcGlob, libGlob, testGlob, bundleTestGlob]), function(err, files) {
105+
glob(pattern, function(err, files) {
96106
files.forEach(function(file) {
97107
var base = path.basename(file);
98108

109+
if(
110+
base === 'README.md' ||
111+
base === 'CONTRIBUTING.md' ||
112+
base === 'CHANGELOG.md' ||
113+
base === 'SECURITY.md' ||
114+
file.indexOf('mathjax') !== -1
115+
) return;
116+
99117
if(base !== base.toLowerCase()) {
100118
logs.push([
101-
file, ' :',
119+
file, ':',
102120
'has a file name containing some',
103121
'non-lower-case characters'
104-
]);
122+
].join(' '));
105123
}
106124
});
107125

0 commit comments

Comments
 (0)