snyk / snyk-php-plugin

Basic Snyk CLI plugin for PHP support
Apache License 2.0
6 stars 6 forks source link

Fixes filename handling #27

Closed mjrider closed 5 years ago

mjrider commented 5 years ago

What does this PR do?

Fixes filename parsing handling ./foo/bar/composer.lock and foo/bar/composer.lock should both be handled the same. So i replaced the string spliting and instead of taking the first array element, i remove the last one

Where should the reviewer start?

How should this be manually tested?

mkdir snyk.test
composer --working-dir=./snyk.test/ require psr/cache
snyk test --file=./snyk.test/composer.lock

The dot in the path is important

Any background context you want to provide?

n/a

What are the relevant tickets?

snyk/snyk#256

Screenshots

n/a

Additional questions

n/a

CLAassistant commented 5 years ago

CLA assistant check
All committers have signed the CLA.

mjrider commented 5 years ago

Hello @adrukh i think it is better if you takeover the change from here, i assume you are a more experienced JS dev and have a better understanding of the codebase.

adrukh commented 5 years ago

Certainly, totally understood, and thanks again for your contribution here. I’ll amend this PR.

adrukh commented 5 years ago

Merging into a side branch to take this further

snyksec commented 5 years ago

:tada: This PR is included in version 1.5.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: