Skip to content

Commit

Permalink
🏗 Use config.lintGlobs instead of a hard-coded list of globs (amppr…
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimha authored Oct 8, 2019
1 parent e430da6 commit 294cd48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build-system/tasks/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,11 @@ function runLinter(stream, options) {
* @return {!Array<string>}
*/
function lintableFilesChanged() {
const lintableFiles = deglob.sync(config.lintGlobs);
return gitDiffNameOnlyMaster().filter(function(file) {
return (
fs.existsSync(file) &&
(path.extname(file) == '.js' || path.basename(file) == 'OWNERS')
lintableFiles.some(lintableFile => lintableFile.endsWith(file))
);
});
}
Expand Down

0 comments on commit 294cd48

Please sign in to comment.