Skip to content

Commit

Permalink
Support Windows paths
Browse files Browse the repository at this point in the history
  • Loading branch information
rifraf authored and bbatsov committed Dec 31, 2013
1 parent ca2a23c commit 07279a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@

### Bugs fixed

* [#698](https://github.com/bbatsov/rubocop/pull/698): Support Windows paths on command-line. ([@rifraf][])
* [#498](https://github.com/bbatsov/rubocop/issues/498): Disable terminal ANSI escape sequences when a formatter's output is not a TTY. ([@yujinakayama][])
* [#703](https://github.com/bbatsov/rubocop/issues/703): BracesAroundHashParameters auto-correction broken with trailing comma. ([@jonas054][])

Expand Down Expand Up @@ -625,3 +626,4 @@
[@emou]: https://github.com/emou
[@skanev]: http://github.com/skanev
[@claco]: http://github.com/claco
[@rifraf]: http://github.com/rifraf
4 changes: 4 additions & 0 deletions lib/rubocop/target_finder.rb
Expand Up @@ -41,6 +41,10 @@ def find(args)
# ruby source files
# @return [Array] Array of filenames
def target_files_in_dir(base_dir = Dir.pwd)
# Support Windows: Backslashes from command-line -> forward slashes
if File::ALT_SEPARATOR
base_dir.gsub!(File::ALT_SEPARATOR, File::SEPARATOR)
end
files = Dir["#{base_dir}/**/*"].select { |path| FileTest.file?(path) }
base_dir_config = @config_store.for("#{base_dir}/foobar.rb")

Expand Down

0 comments on commit 07279a1

Please sign in to comment.