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

fix CxxLint with unit tests #1355

Merged
merged 2 commits into from
Dec 19, 2017
Merged

Conversation

Bertk
Copy link
Contributor

@Bertk Bertk commented Dec 17, 2017

This change is Reviewable

@Bertk Bertk requested a review from jmecosta December 17, 2017 12:00
@Bertk Bertk self-assigned this Dec 17, 2017
@Bertk Bertk added the bug label Dec 17, 2017
@Bertk Bertk added this to the 0.9.9 milestone Dec 17, 2017
@Bertk Bertk requested a review from guwirth December 17, 2017 12:00
@Bertk
Copy link
Contributor Author

Bertk commented Dec 17, 2017

@guwirth @jmecosta Is this extension still required or can it be removed?

@jmecosta
Copy link
Member

Yep we are using to do code analysis on the fly in visual studio

@Bertk
Copy link
Contributor Author

Bertk commented Dec 18, 2017

@jmecosta OK. The extension uses

import org.sonar.api.batch.sensor.internal.SensorContextTester;
...
SensorContextTester sensorContext = SensorContextTester.create(targetFile.getParentFile().toPath()); 
...
sensorContext.fileSystem().add(TestInputFileBuilder.create("", targetFile.getParentFile(), targetFile).build()); 

and I feel this should only be used in unit tests. Do you know another way to implement input file context?

@guwirth
Copy link
Collaborator

guwirth commented Dec 19, 2017

@Bertk ready to merge?

@Bertk
Copy link
Contributor Author

Bertk commented Dec 19, 2017

@guwirth Yes please 👍

@guwirth guwirth merged commit fd76017 into SonarOpenCommunity:master Dec 19, 2017
@Bertk Bertk deleted the coverage branch December 20, 2017 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants