Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #658 from abbeyj/js-extension
Browse files Browse the repository at this point in the history
Analyze files as JavaScript only if their name ends in .js or .jsm.
  • Loading branch information
erikrose committed Jan 31, 2018
2 parents 7d42537 + 0c65418 commit c7f124a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dxr/plugins/js/analyze_js/analyze_tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ function main() {
walker.on("file", (root, stat, next) => {
const fullPath = path.join(root, stat.name);
const pathSegment = path.relative(treeRoot, root);
// Test each ignore pattern against the path, and make sure it ends in .js.
const disallow = (reduceIgnores(fullPath, !/jsm?$/.test(stat.name))
// Test each ignore pattern against the path, and make sure it ends in .js or .jsm
const disallow = (reduceIgnores(fullPath, !/\.jsm?$/.test(stat.name))
|| testSegments(pathSegment));
if (!disallow) {
const tempPath = path.join(tempRoot, pathSegment);
Expand Down

0 comments on commit c7f124a

Please sign in to comment.