node/lib/metasm/misc/lint.rb
# this is a ruby code cleaner tool
# it passes its argument to ruby -v -c, which displays warnings (eg unused variable)
# it shows the incriminated line along the warning, to help identify false positives
# probably linux-only, and need ruby-1.9.1 or newer
this is a ruby code cleaner tool
it passes its argument to ruby -v -c, which displays warnings
it shows the incriminated line along the warning, to help identify false positives
probably linux-only, and need ruby-1.9.1 or newer
this is a ruby code cleaner tool it passes its argument to ruby - v - c which displays warnings it shows the incriminated line along the warning to help identify false positives probably linux - only and need ruby - 1 . 9 . 1 or newer
def lint(tg)
	if File.symlink?(tg)
	elsif File.directory?(tg)
		Dir.entries(tg).each { |ent|
			next if ent == '.' or ent == '..'
			ent = File.join(tg, ent)
			lint(ent) if File.directory?(ent) or ent =~ /\.rb$/
		}
	else
		lint_file(tg)
	end
end
def lint ( tg ) if File . symlink? ( tg ) elsif File . directory? ( tg ) Dir . entries ( tg ) . each { | ent | next if ent == '.' or ent == '..' ent = File . join ( tg , ent ) lint ( ent ) if File . directory? ( ent ) or ent =~ / \. rb$ / } else lint_file ( tg ) end end
this is a ruby code cleaner tool
it passes its argument to ruby -v -c, which displays warnings (eg unused variable)
it shows the incriminated line along the warning, to help identify false positives
probably linux-only, and need ruby-1.9.1 or newer
this is a ruby code cleaner tool it passes its argument to ruby - v - c which displays warnings ( eg unused variable ) it shows the incriminated line along the warning to help identify false positives probably linux - only and need ruby - 1 . 9 . 1 or newer
# nothing
tg