Recently in flog Category

Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.

Changes:

2.5.0 / 2010-09-01

  • 1 major enhancement:

    • Added plugin system. Define a module under Flog to extend it.
  • 3 minor enhancements:

    • Added special case penalty for wtf to_proc: blah(&b = proc {...}) (benjaminb)
    • Improved tests and test coverage.
    • Unfactored & refactored report code. Much cleaner and more maintainable now.
  • 2 bug fixes:

    • Fixed API change for FlogTask (andreacampi)
    • Fixed bad edgecase handler for block_pass (benjaminb)
  • http://ruby.sadi.st/

  • http://rubyforge.org/projects/seattlerb

Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.

Changes:

2.4.0 / 2009-12-15

  • 4 minor enhancements:

    • Cleaned method_name to return "#method" or "::method".
    • DSL reporting now handles regexp literals for 'method' names (Marty Andrews)
    • Improved tests for process_iter's myriad complexities.
    • More doco!
  • 1 bug fix:

    • Fixed DSL reporting excluding solo-blocks. (eg a single rake task)
  • http://ruby.sadi.st/

  • http://rubyforge.org/projects/seattlerb

Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.

Changes:

2.3.0 / 2009-12-09

  • 1 major enhancement:

    • Added file:line info to the flog report (Marty Andrews)
  • 13 minor enhancements:

    • Added .autotest.
    • Deleted pre-gauntlet scripts.
    • Flog#method_name now at least tries show when it is a class method.
    • Flog.parse_options now takes args directly.
    • Removed Flog#incrementtotalscore_by.
    • Removed Flog#output_summary.
    • Removed Flog#process_attrset.
    • Removed Flog#recordmethodscore.
    • Removed Flog#summarize_method.
    • Removed Flog::default_options.
    • Renamed Flog#analyzelist to processuntil_empty.
    • Renamed Flog#options to #option
    • Rewrote entire test suite (3100 lines down!). Cleaner and less brittle.
  • http://ruby.sadi.st/

  • http://rubyforge.org/projects/seattlerb

Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.

Changes:

2.2.0 / 2009-08-14

  • 1 minor enhancement:

    • #mass pushed up to sexp_processor
  • 5 bug fixes:

    • --group didn't use canonical class name.
    • Fixed bin/flog to use flog, not flog_files (removed in last rev)
    • Fixed crasher when processing a block with empty goalposts.
    • Switching to ruby_parser broke ERB syntax error handling. (imccoy)
    • skip empty files instead of crashing. yay?
  • http://ruby.sadi.st/

  • http://rubyforge.org/projects/seattlerb

Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.

Changes:

2.1.2 / 2009-06-24

Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.

Changes:

2.1.1 / 2009-06-23

ParseTree EOL

| | Comments (3)

There seems to be some confusion and/or panic about ParseTree that I'd like to clear up:

ParseTree is dead on ruby 1.9 and there is no plan to make it work.

Because of changes to internals in 1.9, ParseTree simply can not work. I asked for hooks/options to allow us to get to the information but they never arrived.

Specifically if you're using ParseTree to access the AST of a live method/block/proc, you're SOL. If you're just using ParseTree to do static analysis, then you can switch to ruby_parser in about a minute of work and you're good to go.

Here is the plan for my projects:

  • RubyToC-1.0.0.5 = switching to ruby_parser
  • flog-2.1.0 = switching to ruby_parser
  • heckle-1.4.2 = dead, unless we can think of something soon.
  • ruby2ruby-1.2.2 = dropping block/proc support.
  • ruby_parser-2.0.2 = no clue why it has a dependency still, no worries here.
  • ZenHacks-1.0.1 = dropping block/proc support -- not that I support this.

I don't know the status of most of the projects dependent on PT or how they're going to deal with this issue. If you use one of these projects directly or indirectly and that project relies on PT for live method/block/proc, then you're probably going to be stuck on 1.8 for a while:

  • SuperCaller-1.0.0 = unsupported - can drop live method support
  • ambition-0.5.4
  • argible-0.1.1
  • integrity-0.1.9.3
  • merb-action-args-1.0.11
  • nitpick-1.0.2
  • protocol-0.8.1
  • red-4.1.7
  • reek-1.0.0 = probably doesn't need live analysis
  • roodi-1.3.5
  • ruby_diff-0.2
  • rubyjs-0.8.0
  • sake-1.0.15
  • thorero-action-args-0.9.4

There are probably other projects out there dependent on PT that I don't know about. All I've listed here are rubyforge gems that depend on PT in their gemspec.

You can check your gems using this:

gem list | egrep "(ambition|argible|integrity|merb-action-args|nitpick|protocol|red|reek|roodi|ruby_diff|rubyjs|sake|thorero-action-args)"

Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.

Changes:

2.1.0 / 2009-03-16

  • 5 minor enhancements:

    • Added --group to aggregate and sort by class scores.
    • Added flog_task.rb
    • Made -q default, removed -n.
    • Made report output more readable and processable.
    • Moved option processing from bin/flog to lib/flog.rb for better testing.
  • 1 bug fix:

    • removed extra attr_readers for total and average. doh
  • http://ruby.sadi.st/

  • http://rubyforge.org/projects/seattlerb

I've got some flog readability enhancements coming in the next release of flog. Check it:

Old Way:

% flog -q lib
Total Flog = 1097.2 (17.4 flog / method)
FlogGauntlet#display_report: (202.1)
Flog#output_details: (85.3)
FlogGauntlet#score_for: (65.9)
Flog#process_iter: (61.9)
Flog#parse_options: (53.7)
Flog#flog: (41.2)
Flog#none: (36.5)
FlogGauntlet#group_by_owner: (27.7)
FlogGauntlet#report_bad_people: (26.8)
FlogTask#define: (24.0)
Flog#output_method_details: (23.2)
Flog#score_method: (22.1)

It works. I guess... But it sucks. Why? Because I can't quickly read the thing and I can't use UNIX tools on it easily. And -q not being the default just didn't make sense. The details were overkill until you were digging in and trying to clean stuff up. So that is enabled with --details and --quite is default.

New Way:

There are two ways to do it now:

Vanilla:

% flog lib
  1115.2: flog total
    17.7: flog/method average

   202.1: FlogGauntlet#display_report
    85.3: Flog#output_details
    65.9: FlogGauntlet#score_for
    61.9: Flog#process_iter
    53.7: Flog#parse_options
    41.2: Flog#flog
    36.5: Flog#none
    27.7: FlogGauntlet#group_by_owner
    26.8: FlogGauntlet#report_bad_people
    24.0: FlogTask#define
    23.2: Flog#output_method_details
    22.1: Flog#score_method

pretty, no?

With Grouping:

% flog -g lib
  1115.2: flog total
    17.7: flog/method average

   323.8: Flog total
    85.3: Flog#output_details
    61.9: Flog#process_iter
    53.7: Flog#parse_options
    41.2: Flog#flog
    36.5: Flog#none
    23.2: Flog#output_method_details
    22.1: Flog#score_method

   322.6: FlogGauntlet total
   202.1: FlogGauntlet#display_report
    65.9: FlogGauntlet#score_for
    27.7: FlogGauntlet#group_by_owner
    26.8: FlogGauntlet#report_bad_people

    24.0: FlogTask total
    24.0: FlogTask#define

Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.

Changes:

2.0.0 / 2009-01-20

About this Archive

This page is a archive of recent entries in the flog category.

flay is the previous category.

gauntlet is the next category.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.32-en