summaryrefslogtreecommitdiff
path: root/rake_tasks/statistic.rake
blob: d30e9b1b801ad8ba7f018d96768991077a0bc4f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
desc 'Report code statistics (LOC) from the application'
task :stats do
  require './rake_tasks/code_statistics'
  CodeStatistics.new(
    ['Main', 'lib', /coderay.rb$/],
    ['CodeRay', 'lib/coderay/'],
    ['  Scanners', 'lib/coderay/scanners/**'],
    ['  Encoders', 'lib/coderay/encoders/**'],
    ['  Helpers', 'lib/coderay/helpers/**'],
    ['  Styles', 'lib/coderay/styles/**'],
    ['Executable', 'bin', /coderay$/],
    ['Executable Tests', 'test/executable/**'],
    ['Functional Tests', 'test/functional/**'],
    ['Scanner Tests', 'test/scanners/**', /suite\.rb$/],
    ['Unit Tests', 'test/unit/**'],
    # ['  Test Data', 'test/scanners/**', /\.in\./, false],
    ['Demos', 'sample/**']
  ).print
end