chentf / ios-sonarshell Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Xcode project configuration (.xcodeproj or .xcworkspace)
-> If you have a project: configure only sonar.objectivec.project
-> If you have a workspace: configure sonar.objectivec.workspace and sonar.objectivec.project
and use the later to specify which project(s) to include in the analysis (comma separated list)
是说如果有一个workspace,那两项都要配置,而不是二选一。需要配置workspace那一项,并且用逗号分隔的形式列出项目中所有的.xcodeproj项对吗?
还有一点是如何忽略项目中pod相关的所有文件?
使用了提供的插件,扫描报错
log:
1:59:49.754 WARN: Metric 'lines' is an internal metric computed by SonarQube. Provided value is ignored.
11:59:49.890 INFO: Sensor Objective-C Squid Sensor [objectivec] (done) | time=2322ms
11:59:49.890 INFO: Sensor Objective-C OCLint Sensor [objectivec]
11:59:49.891 INFO: parsing /Users/Jenkins/workspace/Sonar-project-alfar-iOS/oclint.xml
11:59:50.468 DEBUG: Collecting issues for /Users/Jenkins/workspace/Sonar-project-alfar-iOS/Alfar/Megvii/Extension/NSArray+ALFExtension.h
11:59:50.468 DEBUG: File /Users/Jenkins/workspace/Sonar-project-alfar-iOS/Alfar/Megvii/Extension/NSArray+ALFExtension.h was found in the project.
11:59:50.494 INFO: ------------------------------------------------------------------------
11:59:50.494 INFO: EXECUTION FAILURE
11:59:50.494 INFO: ------------------------------------------------------------------------
11:59:50.495 INFO: Total time: 6.963s
11:59:50.570 INFO: Final Memory: 46M/331M
11:59:50.570 INFO: ------------------------------------------------------------------------
11:59:50.570 ERROR: Error during SonarQube Scanner execution
The rule 'OCLint:compiler warning' does not exist.
11:59:50.571 DEBUG: Execution getVersion
11:59:50.572 DEBUG: Execution stop
Build step 'Execute shell' marked build as failure
同时下载了https://github.com/mjdetullio/sonar-objective-c 的源码,编译报错,少两个文件
我下载了iOS-sonarShell-master.zip,里面包含两个编译好的jar包:backelite-sonar-objective-c-plugin-0.6.2.jar 和 sonar-objective-c-plugin-0.5.0-SNAPSHOT.jar, 但是无论将哪个包放入{SONAR_HOME}/extensions/plugins,重启sonar都有问题,从sonar的web.log里面:
`
2020.08.11 13:43:32 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Fail to load plugin ObjectiveC [objectivec]
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:82)
at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:543)
at org.sonar.server.platform.Platform.start(Platform.java:211)
at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:185)
at org.sonar.server.platform.Platform.access$500(Platform.java:46)
at org.sonar.server.platform.Platform$1.lambda$doRun$0(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.runIfNotAborted(Platform.java:371)
at org.sonar.server.platform.Platform$1.doRun(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.run(Platform.java:355)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NoClassDefFoundError: org/sonar/api/batch/AbstractSourceImporter
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
at org.sonar.classloader.ClassRealm.loadClassFromSelf(ClassRealm.java:125)
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:37)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
at org.sonar.plugins.objectivec.ObjectiveCPlugin.getExtensions(ObjectiveCPlugin.java:49)
at org.sonar.api.SonarPlugin.define(SonarPlugin.java:51)
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:72)
... 9 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.sonar.api.batch.AbstractSourceImporter
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
... 24 common frames omitted
`
我用的是 sonarqube-7.9
i replace the sonar-objective-c-plugin-0.5.0-SNAPSHOT.jar with backelite-sonar-objective-c-plugin-0.6.2.jar, the sonar can not show clint report. if i use sonar-objective-c-plugin-0.5.0-SNAPSHOT it is ok
极力支持作者把代码开源,一起来维护
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.