Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
markdownChanges.forEach(path => {
const fileContent = fs.readFileSync(path);
fileContent
.toString()
.split(/\r?\n/)
.forEach((line, lineIndex) => {
AVOID_EXACT_WORDS.forEach(phrase => {
if (line.includes(phrase.word)) {
warn(`${phrase.reason} on line ${lineIndex + 1} in ${path}`);
}
});
});
});
commonFileWarnings('test.log', {
msg:
'The build logs contain these warnings (check the build output in Travis for more details):',
});