grodowski / undercover

undercover warns about methods, classes and blocks that were changed without tests, to help you easily find untested code and reduce the number of bugs. It does so by analysing data from git diffs, code structure and SimpleCov coverage reports
https://undercover-ci.com
MIT License
724 stars 28 forks source link

Does not find uncovered sinatra routes #135

Open antondalgren opened 3 years ago

antondalgren commented 3 years ago

Undercover does not find this uncovered sinatra route:

get '/dummy_path' do
  puts "This line is not covered"
end

git diff master:

+    get '/dummy_path' do
+      puts "This line is not covered"
+    end

undercover -c master:

undercover: ✅ No coverage is missing in latest changes
Undercover finished in 0.0505s

simplecov HTML formatter output: image

grodowski commented 3 years ago

@antondalgren hi and thanks for reporting! There's a known edge-cases that might or may not be related to this: #83. Can you include a sample file that shows this behaviour? I'll look into it