Ensure proper file permissions on startup

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
Ken Powers 2020-02-21 18:40:04 -05:00 committed by GitHub
parent 6b56dd4ce0
commit 8d9ccd3c0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 289 additions and 24 deletions

View file

@ -3,8 +3,7 @@
import { readFileSync } from 'fs';
import { join, relative } from 'path';
// @ts-ignore
import * as glob from 'glob';
import { sync as fgSync } from 'fast-glob';
import { forEach, some, values } from 'lodash';
import { ExceptionType, REASONS, RuleType } from './types';
@ -44,7 +43,7 @@ const exceptions: Array<ExceptionType> = loadJSON(exceptionsPath);
const exceptionsLookup = createLookup(exceptions);
let scannedCount = 0;
const allSourceFiles = glob.sync(searchPattern, { nodir: true });
const allSourceFiles = fgSync(searchPattern, { onlyFiles: true });
const results: Array<ExceptionType> = [];