Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Path to config? #87

Closed
basickarl opened this issue Apr 14, 2020 · 3 comments
Closed

Path to config? #87

basickarl opened this issue Apr 14, 2020 · 3 comments

Comments

@basickarl
Copy link

Hi! I'm wondering there is a way to set where the config file lies, I have all my configs which aren't in source control in a directory called "config", anyway to make it look there? Alternatively make the sonar-scanner command recursively look for the first config file.

@0m4r
Copy link

0m4r commented Jun 18, 2020

I think all that needs to be done to enable this is to modify the dist/index.js file like this:

/*
 * Function used programmatically to trigger an analysis.
 */
function scan(params, callback, args = []) {
  scanCLI(args, params, callback)
}

and then you would need to use it like:

sonarQubeScanner(
  {}, 
  () => setTimeout(callback, 2000), 
  [`-Dproject.settings=path/to/my/config/file.properties`]
);

I could make a PR if @bellingard considers this a viable option.
I would also need to have this configurable and I'd like not to fork this but rather continue using it and if possible contribute to it ;)

UPATE:
actually is a bit more complicated than this, for example also this file dist/sonarqube-scanner-params.js should be updated in its function defineSonarQubeScannerParams but still, it probably doable.

@gabssnake
Copy link
Collaborator

Hey folks, still interested in a PR?

@gabssnake
Copy link
Collaborator

Hi @basickarl and @0m4r,

Not sure if you still care about this. I created a list of potential improvements and mentioned this topic:

I'll close this issue for now. Feel free to reopen if you have any feedback.

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

No branches or pull requests

3 participants