nicolashohm
Repos
46
Followers
11
Following
10

Events

Created at 1 week ago
issue comment
flag to ignore line numbers

@AlessandroMinoccheri sure. Let's say there are two UndefinedMethod violations saying The method SomeClass::expects does not exist in this code:

private SomeClass $mock;
// ...
$this->mock->expects($this->once())
// ...
$this->mock->expects($this->once())

The baseline file looks like this:

<file src="Test.php">
    <UndefinedMethod>
       <code>expects</code>
       <code>expects</code>
    </UndefinedMethod>
</file>

It's also not ideal, especially since the code snippet is sometimes really weird/random, like in this example: <code>ry\Adapter\O</code> But even though it's sometimes bullshit, it works fine for us ✌️

Created at 2 weeks ago
issue comment
flag to ignore line numbers

I'm really happy to see this PR. I've the same struggle, everytime we change imports or class attributes the line numbers are chaning. Having an option to ignore them would be a good compromise for us too.

Another option could be what psalm is kind doing. They store a code snippet instead of the line number.

Created at 2 weeks ago
Created at 3 weeks ago
Created at 2 months ago