codeclimate-duplication
codeclimate-duplication copied to clipboard
Ignore PHP namespace statements
We're seeing hundreds of code duplication warnings for namespace statements.

#245 didn't include the actual namespace
statements and this PR covers the case when there is a space between the namespace
and use
blocks.
The CircleCI tests are don't seem to be working: https://circleci.com/gh/codeclimate/codeclimate-duplication
Any tips @larkinscott?
Any feedback on this PR @toddmazierski @brynary?
👋 @tillkruss Thanks for the PR! This seems reasonable to me.
Looking into this CI failure now.
@tillkruss Thanks for bringing that CI failure to our attention. This should be fixed now if you rebase on top of master.
@larkinscott I rebased the branch, but now other tests are failing:
rspec ./spec/cc/engine/analyzers/php/main_spec.rb:138 # CC::Engine::Analyzers::Php::Main#run can parse php 7 code
rspec ./spec/cc/engine/analyzers/php/main_spec.rb:93 # CC::Engine::Analyzers::Php::Main#run runs against complex files
Both fail due to:
expected: > 0
got: 0
I assume the issue previously was the namespace and my PR eliminates the issue?