Open
Description
- See Roadmap
- See Code tools
- See TODO
Checklist items to be added and updated. Currently a bit of copypaste
Plugin System / Modularity
- Tease apart how Hotspots are calculated and compared. Remove dead code #77 f96549 Adding tests #127
- metric, problem, score, weight, line, file, trend? suggestion?, problem_type (file, class, method)
- Each metric configures itself and adds itself to a list of configured plugins Let each metric configure itself, and encapsulate its configuration #91
- Rearrange classes, files, and narrow each classes public api Simpler load paths #139
- Plugins can use an Environment object to check for ruby version, engine, capabilities, os, etc.
- Reduce class responsibilities. Commenting the top of each class with its responsibilities should help
- Make a proper metric grapher subclass
- Make a proper individual metric configuration subclass
-
Make a proper formatter object - Make a proper metric runner object
- Get rid of how MetricFu and MetricFu::Configuration reach into each other back and forth.
- Logic to enable or skip metrics
- Consider making a linter to validate metric plugins, like ActiveModel::Lint::Tests so that external metric_fu plugins can easily test themselves.
- Extract out metrics into gems: esp. cane, saikuro, roodi, rcov. See Code Tools for consideration of what the core functionality should be
Enhancements
- Switch from
rake stats
to code_metrics. Replace native rails stats task with extract gem version #108 -
Add Formatters to enable output customization - Be able to run metric tools from metric_fu without shelling out
- Make it easier to whitelist metrics when running from the commandline (cli)
- Surface configurable options. (Right now you basically need to look in configuration.rb for symbols)
- environment: rail? mri? jruby? ripper? cruise_control? osx?
- logging: log_level, output destination
- io: directories( code_dirs, base_dir, scratch_dir, output_dir, data_dir, roo_dir, template_dir)
- reporting: templates classes, selectedd template, link_prefix, syntax_highlighting, open report in browser?, graph engine
- formatters: available and enabled
- metrics: enabled metrics and config Metric activation fixes for rails_best_practices, code_analyzer, and ripper #126
- any library extensions
- error behavior
- Add configurable Logger to all output streams, with a
log_level
e.g. debug, info, warn, fatal - Be able to specify folders to run against rather than just app and lib set_code_dirs check for existence #129
- Be able to generate historical metrics for eg gem releases (tagged with appropriate date). file format should be sequential by data, e.g. yyyymmdd-sequencenumber-fingerprint.yml where fingerprint method can be configured. Possibly use git for-each tag Feature Request: Allow getting metrics for Old Code via Source Control #107 Data timestamp should be down to the second #96 Adding support for running metrics against a particular git hash #188
- Be able to set run date on the metric reports so that we can generate historical metrics.
- Identify trends, make suggestions?
- Errors
- Have an ErrorHandler with hooks, failure messages, and can output debug-info to paste into issues
- Also have ExitCodes.
- Environment class that knows the ruby version, engine, ripper support, any errors, log level, operating system, artifact / output directory
- Optionally open a browser window, see launchy
- Add commandline --debug-info flag to output info that can be pasted into an issue Add commandline --debug-info flag to output info that can be pasted into an issue #71, Add debug-info command line option. #118
- Show what file a metric fails processing on, when available Show what file a metric fails processing on, when available #68
- Consider replacing churn with turbulence Add turbulence to metric_fu #86
Bugs
- Flog metrics don't consistently return file paths or line numbers, why? Flog metrics don't consistently return file paths or line numbers #66
- Handle Encoding issues in MetricFu and metric libraries. Encoding failure prevents report generation #120
- Handle failures in non-MRI rubies with incomplete ripper support, e.g. JRuby might crash on cane [#120] Handle some encoding errors #131
- set_code_dirs check for existence set_code_dirs check for existence #129
Analysis
- Make the Location and LineNumber (rcov, reek, saikuro) classes work
- Clarify hotspot weighting See f9654924b28
Testing
- Fix specs to run with config.order = 'random' Tests failing when config.order set to 'random' #112
- Test against a dummy rails app.
- Remove / Modify Devver code from the generators/hotspots_spec and base/hotspot_analzyer_spec
- Add (pending) tests
- Remove useless tests Remove dead code #77
Reporting
- Make the graphs prettier. See turbulence, simplecov.
- Make the hotspots page prettier
- For HTML pages
- use pjax to make it faster
- add more links between reports to make exploration easier
Documentation
- Understand and explain how each metric can be used, purpose of metric. e.g. complexity, duplication, smells, coverage, security, style, documentation
- Use yard doc, remove outdated comments
- Keep README up to date Update Readme; it's out of sync #114
Misc
- Stabilize release task to build gem, make checksum, add and commit, tag and push to github, push to rubygems
- Instructions for running on jenkins
- Run with
RUBYOPT=-w
and address warnings - Consider letting RailsBestPractices run on non-rails apps. It works.