codeclimate-duplication icon indicating copy to clipboard operation
codeclimate-duplication copied to clipboard

Allow excluding specific lines (such as strict_types declaration in PHP).

Open treyssatvincent opened this issue 7 years ago • 0 comments

It's really common for a PHP project to have multiples files starting by the same namespace. If someone add a strict_types declaration before that namespace it will trigger similar-code.

For example the following code could be at the start of all controllers from a PHP project.

<?php
declare(strict_types=1);

namespace MyProject\Controllers;

It's a similar issue to #179, maybe adding an "exclude_lines" to the config might solve this problems and future similar problems.

treyssatvincent avatar May 14 '19 11:05 treyssatvincent