porscheinformatik / sonarqube-licensecheck

SonarQube Licensecheck Plugin
Apache License 2.0
156 stars 58 forks source link

Resolve node_modules relative to package.json #380

Closed fvclaus closed 10 months ago

fvclaus commented 1 year ago

We have the following project structure:

pom.xml
  src/main/resources/static
     package.json
     node_modules

I can add the package.json to sonar.sources, but nothing is ever found, because node_modules folder is expected to reside in moduleBaseDir (which is root in this example).

I thought about supporting the old & and new behavior and searching for the node_modules in two locations, but I don't think I have ever come across a project where node_modules is not located next to package.json .

I also had to restructure the test sources, because I could not easily add the a new test case.

@derkoe can you please take a look?