Skip to content

Allow java version to be specified #40

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

Merged
merged 4 commits into from
Oct 17, 2017

Conversation

filipesperandio
Copy link
Contributor

@filipesperandio filipesperandio commented Oct 17, 2017

Allow to easily pass Java properties through the config.yml:

  ...
  config:
    sonar.java.source: 1.6

Related to #10

@filipesperandio filipesperandio changed the title Merge Sonar's Options and CC's Config Allow java version to be specified Oct 17, 2017
@codeclimate-hermes codeclimate-hermes requested review from maxjacobson and removed request for codeclimate-hermes October 17, 2017 17:17
@@ -66,4 +66,4 @@ public void capture_exceptions_and_log_to_stderr() throws Exception {
assertThat(system.exitCode).isEqualTo(1);
assertThat(stderr.toString()).contains("Can't find project home. System property not set: project.home");
}
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be nice not to make changes like this if it's not needed

@Test
public void specify_java_source_version_through_config() throws Exception {
Shell.Process process = Shell.execute("build/codeclimate-sonar fixtures/java_source_version fixtures/java_source_version/config.json");
assertThat(process.stderr).contains("Configured Java source version (sonar.java.source): 6");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this 6 when the file specifies 1.6?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is java stupidity. Not sure if it was Sun/Oracle or the community, but after java 1.5 the versions became ambiguous: 1.6 -> 6; 1.7 -> 7...
Sonar handles both cases.

@filipesperandio filipesperandio merged commit 03745e1 into channel/beta Oct 17, 2017
@filipesperandio filipesperandio deleted the fe/generic-properties branch October 17, 2017 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants