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

Not picking up version from package.json #75

Closed
heruan opened this issue Aug 28, 2019 · 4 comments
Closed

Not picking up version from package.json #75

heruan opened this issue Aug 28, 2019 · 4 comments

Comments

@heruan
Copy link

heruan commented Aug 28, 2019

I'm using the latest version of both SQ and this scanner, but it's not picking up the version field from package.json and in SQ I get "unknown version".

If I put sonar.projectVersion in sonarqube.properties then it works, but having to maintain a redundant version field is error-prone.

Is the scanner supposed to pick up the version from package.json?

Note: I'm running the scanner from the command line.

@Cowdrey
Copy link

Cowdrey commented Nov 19, 2019

It seems to only look at the package.json if there is not a properties file (by design). There should be a way to have a properties file and leave out the version or name so it gets picked up from the package.json

@gemogopi
Copy link

gemogopi commented Dec 5, 2019

I beleive @Cowdrey is right. scanner should give precedence to package,json and pickup version rather from properties file. Its not fair to manually give same version in more than one place.

@gabssnake
Copy link
Collaborator

Hey folks, anyone wants to attempt a PR for this?

@gabssnake
Copy link
Collaborator

Hi everyone, I created a list of potential improvements and mentioned this topic:

I'll close this issue for now. Feel free to reopen if you want to create a PR ;)

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

4 participants