Service
The Stats plugin is a simple code statistics analyizer, producing a basic LOC analysis.
TODO: Add support for testable demo/ (how?).
Default folders and/or file patterns to exclude from analysis.
Default folder to store generated files under log/.
Default folder(s) to find test scripts.
Files patterns to specially exclude from loadpath. Default is [‘ext’] b/c this does not yet support C analysis.
Scan source code counting files, lines of code and comments and presents a report of it’s findings.
TODO: Add C support for ext/.
# File lib/plugins/syckle/stats.rb, line 62 def analyize loadpath = self.loadpath.to_list exclude = self.exclude.to_list files = multiglob_r(*loadpath) - multiglob_r(*exclude) #() #.inject([]){ |memo, find| memo.concat(glob(find)); memo } #Dir.multiglob_with_default(DEFAULT_STATS_FILES) if output.outofdate?(*files) or force? generate_stats(files) else out = output.relative_path_from(project.root) report "Stats are current (#{out})." end end
Setup default attribute values.
# File lib/plugins/syckle/stats.rb, line 49 def initialize_defaults @title = metadata.title #|| metadata.package @loadpath = metadata.loadpath #|| ['lib'] @testpath = DEFAULT_TESTPATH @exclude = DEFAULT_EXCLUDE @output = project.log + DEFAULT_FOLDER end
Generated with the Darkfish Rdoc Generator 2.