Skip to content

Commit

Permalink
Merge pull request #239 from ruby-formatter/ignore-node-modules
Browse files Browse the repository at this point in the history
Ignore node modules folder
  • Loading branch information
gingermusketeer committed Mar 8, 2020
2 parents 0e25646 + 924e198 commit fe88a0b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added
- Code coverage tracking with codecov.io
- `node_modules` folders are now ignored.

## [0.11.0] - 2020-02-09

Expand Down
5 changes: 1 addition & 4 deletions lib/rufo/file_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@ class Rufo::FileFinder
*EXTENSIONS,
]

EXCLUDED_DIRS = [
"vendor",
]

EXCLUDE_PATTERNS = [
"vendor/**/*",
"node_modules/**/*",
]

def initialize(files_or_dirs, includes: [], excludes: [])
Expand Down
6 changes: 3 additions & 3 deletions spec/lib/rufo/file_finder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
end
end

context "the directory contains vendor directory" do
let(:file_or_dir) { finder_fixture_path("only_vendor") }
context "the directory contains common dependency directories" do
let(:file_or_dir) { finder_fixture_path("dependency_folders") }

it "ignores the vendor directory" do
it "ignores the directories" do
expect(subject.to_a).to match_array(abs_paths([]))
end
end
Expand Down

0 comments on commit fe88a0b

Please sign in to comment.