sonar-swift
sonar-swift copied to clipboard
ERROR: The rule 'OCLint:compiler warning' does not exist
If a build has a compilation warning, Sonar is not able to digest the XML file that OCLint produces.
INFO: Sensor org.sonar.plugins.objectivec.violations.oclint.OCLintSensor INFO: Processing OCLint report sonar-reports/oclint_report.xml INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ INFO: Total time: 8.993s INFO: Final Memory: 49M/321M INFO: ------------------------------------------------------------------------ ERROR: Error during SonarQube Scanner execution ERROR: The rule 'OCLint:compiler warning' does not exist.
This PR fixes it for the deprecated version of this project: https://github.com/Backelite/sonar-objective-c/issues/45
Thanks for bringing up this issue. I just ran into it myself and I was about to make an issue/pull request that is a duplicate of the one you linked. I will get a pull request started now.
PR here: https://github.com/Backelite/sonar-swift/pull/168
https://github.com/Backelite/sonar-swift/pull/163 should fix the issue. Awaiting merge.
I understand the issue but the problem is somewhere else IMO.
Compiler warning can be anything from deprecated method usage to #warning
placed by developers in the source code.
SonarQube works with predefined rules, integrating this rule doesn't help in knowing what would be wrong because it's not possible (as much as i know) to provide contextual and additional informations about a rule violation.
To me, the right way would be to either:
- not have compiler warnings in the oclint report (check with OClint maybe?)
- clean the compiler warnings from the oclint report
- ignore unknown rules in the OCLint parser in the plugin
In order to fix this we should consider using this option: -extra-arg=-Wno-everything
.
Same issue here -extra-arg=-Wno-everything doesn't work in my case :(