-
Notifications
You must be signed in to change notification settings - Fork 19
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
Not able to find a InputFile with R/tests/testthat.R #17
Comments
You are correct: only "main" files are reported to SonarQube for found issues. All other LintR issues found on for example test files will be ignored. I can imagine it could be configurable or filter can be removed completely. Any suggestion from your side? |
Yes in my opinion it would make sense to lint the test files as well as the main files.
Thank you. |
Hello @kmoco2am could we please add these modifications to the project if they look ok to you? Thank you! |
Hi, it would may be make sense to make it configurable. There can be projects where developers care about production files quality mainly and tests could be more relaxed so excluded. What do you think? |
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
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 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.
The text was updated successfully, but these errors were encountered: