djberg96 ([info]djberg96) wrote,
@ 2008-12-18 21:16:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Current mood:determined
Entry tags:ruby, testing

Warnings == Errors
I see Piers has discovered that Rails doesn't run -w clean, and it's not alone.

I feel your pain Piers.

Here's the template for all of my Rake test tasks. You should take heed:

desc "Run the test suite"
Rake::TestTask.new("test") do |t|
   t.warning = true
   t.verbose = true
   # ...
end

A few incredibly obnoxious gcc warnings aside, if you treat warnings as errors you're going to end up with better code, and you might just spot a few bugs to boot.



(2 comments) - (Post a new comment)


[info]pdcawley
2008-12-21 05:01 am UTC (link)
I sometimes wonder if worrying about warnings is one of the ways you can spot the old Perl hands working with Ruby.

Rails not running -w clean is an old worry that I've only recently written up. Rails not running -T clean is bit that propery scares me though.

(Reply to this) (Thread)


[info]djberg96
2008-12-26 02:10 am UTC (link)
I haven't tried running with -T, but I should try it some time. That being said, Ruby's $SAFE level semantics (and Perl's, really) have always felt like a half baked, arbitrary system to me. I think the real solution is sandboxing by the end users, not sprinkling the C source files with safe level checks.

On a side note, I need to see if there's a 'taint = true' option for Rake test tasks.

(Reply to this) (Parent)


(2 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…