Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract gradle project & sub-project names on every test #93

Closed
lili2311 opened this issue Aug 28, 2019 · 1 comment · Fixed by #95
Closed

Extract gradle project & sub-project names on every test #93

lili2311 opened this issue Aug 28, 2019 · 1 comment · Fixed by #95

Comments

@lili2311
Copy link
Contributor

lili2311 commented Aug 28, 2019

Expected behaviour

After doing a little digging realised we are not grabbing the actual project names when returning back results, here is the PR with some tests that shows the desired outcome https://github.com/snyk/snyk-gradle-plugin/tree/feat/get-correct-project-names

Users can scan a project with:

  • snyk test --all-sub-projects
  • snyk test --file=path/to/build.sbt
  • snyk test --gradle-sub-project=path/to/build.sbt

So we need to be mindful of what is the context and grab the relevant project name that we just scanned.

There are two potentials:

  • extract the project name in the already used init.gradle, there is most likely a way to get that there and return it back for processing in the TypeScript lib wrapper / child process wrapper
    To get the correct project names for testing purposes you can run gradle projects which will list the root project and any sub-projects from that directory

  • if that is not possible we can use gradle to get the names in the relevant context 🐌 this may be too slow, as we already execute gradle when getting the deps, so this would be a second call.

Actual behaviour

The tests in this branch fail https://github.com/snyk/snyk-gradle-plugin/tree/feat/get-correct-project-names

Steps to reproduce

Run the tests on the branch above

If applicable, please append the --debug flag on your command and include the output here **ensuring to remove any sensitive/personal details or tokens.

@snyksec
Copy link

snyksec commented Sep 17, 2019

🎉 This issue has been resolved in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants