The plugin is able to find and lint source files, but not able to find test files:
ERROR: Not able to find a InputFile with R/tests/testthat.R
However, in the logs I can see that this test file was indexed correctly:
'R/tests/testthat.R' indexed as test with language 'r'
Also, I made sure to define the properties in sonar-project.properties:
sonar.sources=R/R/
sonar.tests=R/tests/
In the source of the plugin, I can see in the function processIssue in file https://github.com/Merck/sonar-r-plugin/blob/master/src/main/java/com/msd/gin/common/sonar/LintRSensor.java#L97 that the InputFile type expected is MAIN InputFile.Type.MAIN (and not TEST), which makes me think that the test files are excluded from linting.
This is even more surprising because there are test files in the json file in the sample-project (https://github.com/Merck/sonar-r-plugin/blob/master/sample-project/lintr_out.json#L390).
Please advise.
The plugin is able to find and lint source files, but not able to find test files:
However, in the logs I can see that this test file was indexed correctly:
Also, I made sure to define the properties in
sonar-project.properties:In the source of the plugin, I can see in the function
processIssuein file https://github.com/Merck/sonar-r-plugin/blob/master/src/main/java/com/msd/gin/common/sonar/LintRSensor.java#L97 that the InputFile type expected is MAINInputFile.Type.MAIN(and not TEST), which makes me think that the test files are excluded from linting.This is even more surprising because there are test files in the json file in the sample-project (https://github.com/Merck/sonar-r-plugin/blob/master/sample-project/lintr_out.json#L390).
Please advise.