资源简介
这是一个 Sonar 的插件,实现对 Objective-C 语言的分析。可分析角度包括:
Complexity
Design
Documentation
Duplications
Issues
Size
Tests
标签:Sonar
标签:Sonar

代码片段和文件信息
/*
* Sonar objective-C Plugin
* Copyright (C) 2012 OCTO Technology
* dev@sonar.codehaus.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not write to the Free Software
* Foundation Inc. 51 Franklin Street Fifth Floor Boston MA 02
*/
package org.sonar.objectivec;
import java.io.File;
import java.util.Collection;
import org.sonar.objectivec.api.objectiveCGrammar;
import org.sonar.objectivec.api.objectiveCMetric;
import org.sonar.objectivec.parser.objectiveCParser;
import org.sonar.squidbridge.AstScanner;
import org.sonar.squidbridge.CommentAnalyser;
import org.sonar.squidbridge.SquidAstVisitor;
import org.sonar.squidbridge.SquidAstVisitorContextImpl;
import org.sonar.squidbridge.api.SourceCode;
import org.sonar.squidbridge.api.SourceFile;
import org.sonar.squidbridge.api.SourceProject;
import org.sonar.squidbridge.indexer.QueryByType;
import org.sonar.squidbridge.metrics.CommentsVisitor;
import org.sonar.squidbridge.metrics.LinesOfCodeVisitor;
import org.sonar.squidbridge.metrics.LinesVisitor;
import com.sonar.sslr.impl.Parser;
public class objectiveCAstScanner {
private objectiveCAstScanner() {
}
/**
* Helper method for testing checks without having to deploy them on a Sonar instance.
*/
public static SourceFile scanSingleFile(File file SquidAstVisitorjectiveCGrammar>... visitors) {
if (!file.isFile()) {
throw new IllegalArgumentException(“File ‘“ + file + “‘ not found.“);
}
AstScannerjectiveCGrammar> scanner = create(new objectiveCConfiguration() visitors);
scanner.scanFile(file);
Collection sources = scanner.getIndex().search(new QueryByType(SourceFile.class));
if (sources.size() != 1) {
throw new IllegalStateException(“Only one SourceFile was expected whereas “ + sources.size() + “ has been returned.“);
}
return (SourceFile) sources.iterator().next();
}
public static AstScannerjectiveCGrammar> create(objectiveCConfiguration conf SquidAstVisitorjectiveCGrammar>... visitors) {
final SquidAstVisitorContextImpljectiveCGrammar> context = new SquidAstVisitorContextImpljectiveCGrammar>(new SourceProject(“objective-C Project“));
final ParserjectiveCGrammar> parser = objectiveCParser.create(conf);
AstScanner.BuilderjectiveCGrammar> builder = AstScanner.jectiveCGrammar> builder(
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-01-29 22:12 sonar-ob
文件 153 2015-01-29 22:12 sonar-ob
文件 4620 2015-01-29 22:12 sonar-ob
文件 547 2015-01-29 22:12 sonar-ob
文件 6421 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
文件 97620 2015-01-29 22:12 sonar-ob
文件 2106 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
文件 4458 2015-01-29 22:12 sonar-ob
文件 1412 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
文件 1321 2015-01-29 22:12 sonar-ob
文件 4462 2015-01-29 22:12 sonar-ob
文件 1522 2015-01-29 22:12 sonar-ob
文件 2296 2015-01-29 22:12 sonar-ob
文件 1223 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
文件 1246 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
文件 1943 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
文件 1258 2015-01-29 22:12 sonar-ob
文件 1720 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
目录 0 2015-01-29 22:12 sonar-ob
............此处省略72个文件信息
相关资源
- 原生网页封装Nativefier.zip
-
优酷视频播放地址分析kupla
yer.zip - springboot+vue.js搭建图书管理系统开源项
- 轻论坛.zip
- 自动化测试开源项目(5个)
- 开源项目SlidingMenu
- 持续交付平台Spinnaker.zip
- 去中心化的网站ZeroNet.zip
- .Net开源博客MZBlog.zip
- 云笔记APP开源项目
- PSOC4血压血氧仪开源项目
- golang值得学习的优秀开源项目4合1
- Swifty屏幕适配解决方案.zip
- 专注于非越狱环境下iOS应用逆向研究
- 微聊APP 聊天功能的开源APP项目
- 百度手环开源项目全套资料(设计文
- 开源项目PLC通信工具 HslCommunication 测
- 基于Yii开发的博客dlfblog.zip
- mallmall 项目是一套电商系统,包括前
- 街机游戏C-DogsSDL.zip
- RTKLIB开源项目(2.4.3)
- 服务发现系统SkyDNS.zip
- 聊天机器人Lita.zip
- GPS3.0版本
- 如何阅读源代码,开源项目
- wkt转arcgis之geometry第三方组件来自开源
- google word2vec开源项目
- FastDFS的Go客户端fdfs_client.zip
- 几十个开源项目28G设计资料,适用于
- 倒计时屏保.zip
评论
共有 条评论