Tôi đang cố gắng sử dụng sóng siêu âm để phân tích tĩnh trên mã C++. Tôi đã cài đặt sonar và cấu hình dự án của tôi (nó xuất hiện trên trang sonar cục bộ, nhưng tôi không thấy bất kỳ vi phạm mã nào cho mã tương ứng). Tôi đã cài đặt plugin cộng đồng C++.Làm thế nào để phân tích sonar cho công việc C++?
sonar-project.properties của tôi trông như thế này:
# required metadata
sonar.projectKey=DiceInvaders
sonar.projectName=Dice Invaders
sonar.projectVersion=1.0
# optional description
sonar.projectDescription=DiceInvaders by CS
# path to source directories (required)
sonar.sources=D:\\DiceInvaders\\Code
# path to test source directories (optional)
#sonar.tests=D:\\DiceInvaders\\Code
# path to project binaries (optional), for example directory of Java bytecode
#sonar.binaries=binDir
# optional comma-separated list of paths to libraries. Only path to JAR file is supported.
#sonar.libraries=path/to/library/*.jar,path/to/specific/library/myLibrary.jar,parent/*/*.jar
# The value of the property must be the key of the language.
sonar.language=c++
sonar.exclusions=**/*.ipch, **/**/*.rc
sonar.cxx.cppcheck.path = "C:\Program Files (x86)\Cppcheck\cppcheck.exe"
sonar.cxx.cppcheck.reportPath="D:\DiceInvaders\Code\cppcheck-reports\cppcheck.xml".
# Additional parameters
#sonar.my.property=value
tôi không nhận được bất kỳ thông báo lỗi khi chạy sonar-Á hậu từ cmd.
Nếu tôi chạy thủ công công cụ cppcheck.exe trên dự án của tôi, tôi có thể tìm thấy vi phạm. Tại sao các vi phạm không xuất hiện trên trang của sonar? Có điều gì khác tôi nên định cấu hình không, tôi có đang làm gì sai không?
Tôi cũng đã thử các lời khuyên từ: http://sonar.15.x6.nabble.com/100-Rules-Compliance-with-C-project-td5008127.html (nhưng tôi không thể thực hiện nó hoạt động) –