MCPcopy Create free account
hub / github.com/plotly/plotly.js / assertFileNames

Function assertFileNames

tasks/test_syntax.js:178–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176
177// check that all file names are in lower case
178function assertFileNames() {
179 var pattern = combineGlobs([
180 path.join(constants.pathToRoot, '*.*'),
181 path.join(constants.pathToSrc, '**/*.*'),
182 path.join(constants.pathToLib, '**/*.*'),
183 path.join(constants.pathToDist, '**/*.*'),
184 path.join(constants.pathToRoot, 'test', '**/*.*'),
185 path.join(constants.pathToRoot, 'tasks', '**/*.*'),
186 path.join(constants.pathToRoot, 'devtools', '**/*.*')
187 ]);
188
189 var logs = [];
190
191 glob(pattern).then((files) => {
192 files.forEach(function(file) {
193 var base = path.basename(file);
194
195 if(
196 base === 'README.md' ||
197 base === 'CONTRIBUTING.md' ||
198 base === 'CHANGELOG.md' ||
199 base === 'SECURITY.md' ||
200 base === 'BUILDING.md' ||
201 base === 'CUSTOM_BUNDLE.md' ||
202 base === 'CITATION.cff' ||
203 file.indexOf('mathjax') !== -1
204 ) return;
205
206 if(base !== base.toLowerCase()) {
207 logs.push([
208 file, ':',
209 'has a file name containing some',
210 'non-lower-case characters'
211 ].join(' '));
212 }
213 });
214
215 log('lower case only file names', logs);
216 });
217}
218
219// check that all files have a trailing new line character
220function assertTrailingNewLine() {

Callers 1

test_syntax.jsFile · 0.85

Calls 3

combineGlobsFunction · 0.85
globFunction · 0.85
logFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…