forked from mcandre/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
109 lines (88 loc) · 3.72 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
task :default => :lint
task :ruby => [] do
sh 'find . -name "*.rb" -exec ruby -wc {} 2>&1 \; | grep -v "Syntax OK" | grep -v openssl | grep -v rubygems; true'
end
task :reek => [] do
sh 'bundle exec reek -q .; echo ""'
end
task :flay => [] do
sh 'bundle exec flay .'
end
task :roodi => [] do
sh 'find . -name "*.rb" -exec bundle exec roodi -config=roodi.yml {} \\;'
end
task :cane => [] do
sh 'find . -name "*.rb" -exec bundle exec cane -f {} \\;'
end
task :excellent => [] do
sh 'bundle exec excellent .'
end
task :rubocop => [] do
sh 'find . \\( -name "*.rb" -or -name "*.rb" -or -name "Guardfile*" \\) -exec rubocop {} \\; | grep -v "no offenses detected" | grep -v "Inspecting 1 file" | grep -v "^\\\\.$" | grep -v "^$"; echo ""'
end
task :tailor => [] do
sh 'bundle exec tailor'
end
task :cowl => [] do
sh 'cowl .'
end
task :gtdlint => [] do
sh 'gtdlint .'
end
task :lili => [] do
sh 'bundle exec lili .'
end
task :editorconfig=> [] do
sh 'find . -type f -name Thumbs.db -prune -o -type f -name .DS_Store -prune -o -type d -name .git -prune -o -type f -name .gitmodules -prune -o -type d -name .hg -prune -o -type d -name .svn -prune -o -type d -name tmp -prune -o -type d -name bin -prune -o -type d -name target -prune -o -name "*.app*" -prune -o -type d -name node_modules -prune -o -type d -name bower_components -prune -o -type f -name "*[-.]min.js" -prune -o -type d -name "*.dSYM" -prune -o -type f -name "*.scpt" -prune -o -type d -name "*.xcodeproj" -prune -o -type d -name .vagrant -prune -o -type f -name .exe -prune -o -type f -name "*.o" -prune -o -type f -name "*.pyc" -prune -o -type f -name "*.hi" -prune -o -type f -name "*.beam" -prune -o -type f -name "*.png" -prune -o -type f -name "*.gif" -prune -o -type f -name "*.jp*g" -prune -o -type f -name "*.ico" -prune -o -type f -name "*.ttf" -prune -o -type f -name "*.zip" -prune -o -type f -name "*.jar" -prune -o -type f -name "*.dot" -prune -o -type f -name "*.pdf" -prune -o -type f -name "*.wav" -prune -o -type f -name "*.mp[34]" -prune -o -type f -name "*.svg" -prune -o -type f -name "*.flip" -prune -o -type f -name "*.class" -prune -o -type f -name "*.cmi" -prune -o -type f -name "*.cmo" -prune -o -type f -name "*.gem" -prune -o -type f -name "*.jad" -prune -o -type d -name .idea -prune -o -type f -name "*.iml" -prune -o -type f -name "*.log" -prune -o -type f -name "*" -exec node_modules/.bin/editorconfig-tools check {} \\;'
end
task :astyle_apply => [] do
begin
sh 'find . -type d -name android -prune -o -type f -name "*.java" -o -name "*.cpp" -o -name "*.[ch]" -exec astyle {} \\; | grep -v Unchanged'
rescue
end
end
task :astyle => [] do
begin
sh 'find . -type d -name android -prune -o -type f -name "*.java" -o -name "*.cpp" -o -name "*.[ch]" -exec astyle --dry-run {} \\; | grep -v Unchanged'
rescue
end
end
task :clean_astyle => [] do
sh 'find . -type f -name "*.orig" -exec rm {} \\;'
end
task :xmllint => [] do
sh 'find . -name "*.xml" -exec xmllint --noout {} 2>&1 \\;'
end
task :infernu => [] do
sh 'find . -type d -name node_modules -prune -o -type d -name bower_components -prune -o -type d -name target -prune -o -type f -name "*.js" -exec infernu {} \\;'
end
task :bashate => [] do
sh 'bashate hooks/* .envrc .bashrc.d/*.sh .bash_profile.d/*.sh *.sh .bash* .profile* ccl clean-windows emacs-android finder-show-hidden-files get-dropbox-foldercat hadoop-env set-wallpaper-mac shmatlab% upgrade-puppet vera'
end
task :bandit => [] do
sh 'find . -name \'*.py\' | xargs bandit'
end
task :lint => [
:ruby,
:reek,
:flay,
:roodi,
:cane,
:excellent,
:rubocop,
:tailor,
:cowl,
:gtdlint,
:lili,
:editorconfig,
:astyle,
:xmllint,
:infernu,
:bashate,
:bandit
] do
end
task :clean => [
:clean_astyle
] do
end