checkstyle / sonar-checkstyle

Support on Checkstyle in SonarQube. Officially transfered from https://github.com/SonarQubeCommunity/sonar-checkstyle
GNU Lesser General Public License v3.0
169 stars 70 forks source link

When importing google-checks.xml, the API reports an error. How to solve this? Must I manually create rules based on the template first? #526

Open JudeWangPP opened 1 month ago

JudeWangPP commented 1 month ago

Sonar version: [9.7] Checkstyle sonar plugin version: [10.12.5]

Steps to reproduce or description of problem: Quality Profiles -> create -> choose:google_checks10.12.5.xml -> create /api/qualityprofiles/create response : { "errors": [ { "msg": "Rule template can't be activated on a Quality profile: checkstyle:com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportChecktemplate" } ] }

muhlba91 commented 1 week ago

you need to create a profile/config in SQ where you basically replicate the contents of the xml-file directly in SQ. there's no support for importing an existing configuration (see #525).