Skip to content

Commit

Permalink
Resolve fasterer and hide vendor/*
Browse files Browse the repository at this point in the history
  • Loading branch information
dankohn committed May 3, 2016
1 parent 547e6d8 commit 18bd237
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .fasterer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
speedups:
rescue_vs_respond_to: true
module_eval: true
shuffle_first_vs_sample: true
for_loop_vs_each: true
each_with_index_vs_while: false
map_flatten_vs_flat_map: true
reverse_each_vs_reverse_each: true
select_first_vs_detect: true
sort_vs_sort_by: true
fetch_with_argument_vs_block: true
keys_each_vs_each_key: true
hash_merge_bang_vs_hash_brackets: true
block_vs_symbol_to_proc: true
proc_call_vs_yield: true
gsub_vs_tr: true
select_last_vs_reverse_detect: true
getter_vs_attr_reader: true
setter_vs_attr_writer: true

exclude_paths:
- 'vendor/**/*.rb'
- 'db/schema.rb'
3 changes: 2 additions & 1 deletion lib/tasks/default.rake
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ desc 'Check YAML syntax (except project.yml, which is not straight YAML)'
task :yaml_syntax_check do
# Don't check "project.yml" - it's not a straight YAML file, but instead
# it's processed by ERB (even though the filename doesn't admit it).
sh "find . -name '*.yml' ! -name 'projects.yml' -exec yaml-lint {} + | " \
sh "find . -name '*.yml' ! -name 'projects.yml' " \
"! -path './vendor/*' -exec bundle exec yaml-lint {} + | " \
"grep -v '^Checking the content of' | grep -v 'Syntax OK'"
end

Expand Down

0 comments on commit 18bd237

Please sign in to comment.