• R/O
  • SSH
  • HTTPS

c4ju: Commit


Commit MetaInfo

Revision2 (tree)
Time2011-10-17 00:50:30
Authorsrz_zumix

Log Message

初回リリース

Change Summary

Incremental Difference

--- trunk/src/filter_default.xml (nonexistent)
+++ trunk/src/filter_default.xml (revision 2)
@@ -0,0 +1,15 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<CCCC_Project>
3+<module_summary>
4+<lines_of_code value="value &lt;= 120" />
5+</module_summary>
6+<procedural_detail>
7+<member_function>
8+<lines_of_code value="value &lt;= 30"/>
9+<McCabes_cyclomatic_complexity value="value &lt;= 30" />
10+<lines_of_comment />
11+<lines_of_code_per_line_of_comment value="value &lt;= 5" />
12+<McCabes_cyclomatic_complexity_per_line_of_comment value="value &lt;= 30" />
13+</member_function>
14+</procedural_detail>
15+</CCCC_Project>
--- trunk/src/Evaluation.cs (nonexistent)
+++ trunk/src/Evaluation.cs (revision 2)
@@ -0,0 +1,63 @@
1+//======================================================================
2+// using
3+using System;
4+using System.CodeDom.Compiler;
5+using System.Reflection;
6+using Microsoft.CSharp;
7+
8+namespace c4ju
9+{
10+ class CSharpEval
11+ {
12+ #region フィールド
13+ CodeDomProvider m_cdp = null;
14+ CompilerParameters m_cps = null;
15+ #endregion
16+
17+ #region コンストラクタ
18+ public CSharpEval()
19+ {
20+ m_cdp = new CSharpCodeProvider();
21+ m_cps = new CompilerParameters();
22+ // メモリ内で出力を生成する
23+ m_cps.GenerateInMemory = true;
24+ }
25+ #endregion
26+
27+ #region Evaluation
28+ public string Eval(string expr)
29+ {
30+ try
31+ {
32+ string source =
33+@"
34+public class MainClass
35+{
36+ public static string Eval()
37+ {
38+ return (expr).ToString();
39+ }
40+}";
41+
42+ source = source.Replace("expr", expr);
43+
44+ CompilerResults cres;
45+ cres = m_cdp.CompileAssemblyFromSource(m_cps, source);
46+ // コンパイルしたアセンブリを取得
47+ Assembly asm = cres.CompiledAssembly;
48+ Type t = asm.GetType("MainClass");
49+ string ret = (string)t.InvokeMember("Eval"
50+ , BindingFlags.InvokeMethod
51+ , null, null, null);
52+ return ret;
53+ }
54+ catch (Exception e)
55+ {
56+ Console.WriteLine(e.Message);
57+ return null;
58+ }
59+ }
60+ #endregion
61+ }
62+
63+} // end of namespace crisp
--- trunk/src/Program.cs (nonexistent)
+++ trunk/src/Program.cs (revision 2)
@@ -0,0 +1,339 @@
1+using System;
2+using System.Collections.Generic;
3+using System.Linq;
4+using System.Text;
5+using System.Xml;
6+using System.IO;
7+using System.Diagnostics;
8+using junit;
9+
10+namespace c4ju
11+{
12+ class Program
13+ {
14+ static int Main(string[] args)
15+ {
16+ bool input_stdin = false;
17+ List<string> files = new List<string>();
18+ string outfile = "test_default.xml";
19+ string filter_xmlpath = "filter_default.xml";
20+ XmlDocument doc_filter = new XmlDocument();
21+
22+ #region コマンドライン解析
23+ // コマンドライン引数の解析
24+ for(int i=0; i < args.Length; ++i )
25+ {
26+ string argv = args[i];
27+ if (argv.IndexOf("--") == 0)
28+ {
29+ string option = argv.Substring(2);
30+ string opt_out_xmlfile = "out_xmlfile";
31+ string opt_filter = "filter";
32+ #region 出力ファイル
33+ if (option.IndexOf(opt_out_xmlfile) == 0)
34+ {
35+ // 出力ファイル名の指定
36+ if (option.Length > 1)
37+ {
38+ if (option.IndexOf("=") == opt_out_xmlfile.Length)
39+ outfile = option.Substring(opt_out_xmlfile.Length + 1);
40+ }
41+ else if( i < args.Length )
42+ {
43+ outfile = args[++i];
44+ }
45+ if( outfile[0] == '\"' )
46+ {
47+ outfile = outfile.Substring(1, outfile.Length - 2);
48+ }
49+ }
50+ #endregion
51+ #region ヘルプ
52+ else if (option == "help")
53+ {
54+ Console.WriteLine(
55+@"c4ju [options] file1.xml ...
56+Process files listed on command line.
57+If the filenames include '-', read a list of files from standard input.
58+
59+Command Line Options:
60+--help : generate this help message.
61+--out_xmlfile=<path> : path of xml report.
62+--filter=<path> : path of test filter xml.
63+"
64+ );
65+ return 0;
66+ }
67+ #endregion
68+ #region フィルターファイル
69+ else if (option.IndexOf(opt_filter) == 0)
70+ {
71+ // フィルターファイル名の指定
72+ if (option.Length > 1)
73+ {
74+ if (option.IndexOf("=") == opt_filter.Length)
75+ filter_xmlpath = option.Substring(opt_filter.Length + 1);
76+ }
77+ else if (i < args.Length)
78+ {
79+ filter_xmlpath = args[++i];
80+ }
81+
82+ if (filter_xmlpath[0] == '\"')
83+ {
84+ filter_xmlpath = filter_xmlpath.Substring(1, filter_xmlpath.Length - 2);
85+ }
86+ }
87+ #endregion
88+ }
89+ #region 標準入力ファイル
90+ else if (i == args.Length - 1 && argv.Length == 1 && argv[0] == '-')
91+ {
92+ input_stdin = true;
93+ }
94+ #endregion
95+ #region 入力ファイル
96+ else
97+ {
98+ files.Add(argv);
99+ }
100+ #endregion
101+ }
102+ #endregion
103+
104+ #region フィルター用意
105+ try
106+ {
107+ doc_filter.Load(filter_xmlpath);
108+ }
109+ catch (Exception e)
110+ {
111+ Console.WriteLine(e.Message);
112+ return 1;
113+ }
114+
115+ if (doc_filter.ChildNodes.Count == 0)
116+ {
117+ Console.WriteLine("not found filter.");
118+ return 1;
119+ }
120+ List<string> filter_xpaths = XmlToXPathList.Convert(doc_filter.SelectSingleNode("//CCCC_Project"));
121+ if (filter_xpaths.Count == 0)
122+ {
123+ Console.WriteLine("not found CCCC_Project node");
124+ return 1;
125+ }
126+ #endregion
127+
128+ #region 標準入力からのファイルパス取得
129+ if (input_stdin)
130+ {
131+ string line = null;
132+ while ( Console.In.Peek() != 0 && (line = Console.In.ReadLine()) != null)
133+ {
134+ files.Add(line);
135+ }
136+ }
137+ #endregion
138+
139+ #region テストの開始処理
140+ Stopwatch test_suites_sw = new Stopwatch();
141+ Stopwatch test_case_sw = new Stopwatch();
142+ Stopwatch test_sw = new Stopwatch();
143+
144+ CSharpEval eval = new CSharpEval();
145+
146+ JunitXmlDocument junitDoc = new JunitXmlDocument();
147+ XmlNode TestSuites = junitDoc.AppendTestSuites("AllTest"
148+ , 0 // 仮
149+ , 0 // 仮
150+ , 0
151+ , test_suites_sw.Elapsed // 仮
152+ );
153+ int test_total_count = 0;
154+ int failure_total_count = 0;
155+
156+ test_suites_sw.Start();
157+ #endregion
158+
159+ #region xml の解析
160+ foreach (string f in files)
161+ {
162+ XmlDocument xml = new XmlDocument();
163+ try
164+ {
165+ xml.Load(f);
166+
167+ Console.WriteLine(f);
168+
169+ foreach (string xpath in filter_xpaths)
170+ {
171+ #region テストケース
172+ XmlNode filter_node = doc_filter.SelectSingleNode(xpath);
173+ if (filter_node != null)
174+ {
175+ try
176+ {
177+ string test_case_name = filter_node.ParentNode.Name + "/" + filter_node.Name + " : " + Path.GetFileNameWithoutExtension(f);
178+ XmlNodeList selectNodes = xml.SelectNodes(xpath);
179+ if (selectNodes != null && selectNodes.Count > 0)
180+ {
181+ XmlNode TestSuite = junitDoc.AppendTestSuite(test_case_name
182+ , selectNodes.Count
183+ , 0 // 仮
184+ , 0
185+ , test_case_sw.Elapsed // 仮
186+ );
187+ int failure_count = 0;
188+
189+ test_case_sw.Reset();
190+ test_case_sw.Start();
191+ foreach (XmlNode node in selectNodes)
192+ {
193+ #region テスト
194+ List<JunitXmlDocument.FailureResult> fr_list = new List<JunitXmlDocument.FailureResult>();
195+ XmlNode sourceNode = null;
196+ string name = node.InnerText;
197+ string file = "";
198+ int line = -1;
199+ #region テスト名・ファイルパス情報の取得
200+ XmlNode parentNode = node.ParentNode;
201+ if (parentNode.Name == "member_function")
202+ {
203+ name = parentNode.SelectSingleNode("name").InnerText;
204+ sourceNode = parentNode.SelectSingleNode("extent/source_reference");
205+ }
206+ else if (parentNode.Name == "module_summary")
207+ {
208+ name = "module_summary";
209+ sourceNode = parentNode.ParentNode.SelectSingleNode("module_detail/source_reference");
210+ }
211+ if (sourceNode != null)
212+ {
213+ file = sourceNode.Attributes["file"].Value;
214+ line = int.Parse(sourceNode.Attributes["line"].Value);
215+ }
216+ #endregion
217+
218+ test_sw.Reset();
219+ test_sw.Start();
220+ foreach (XmlAttribute filter_attr in filter_node.Attributes)
221+ {
222+ #region 属性ごとにテスト
223+ try
224+ {
225+ XmlAttribute attr = node.Attributes[filter_attr.Name];
226+ if (attr != null)
227+ {
228+ // フィルタリング用のxmlは式が記述されている
229+ // value は比較対象の属性valueに置換される。
230+ // 式評価がfalseを返した場合、テスト失敗とみなす。
231+ string expr = filter_attr.Value;
232+ expr = expr.Replace("value", attr.Value);
233+ string result = eval.Eval(expr);
234+ ++test_total_count;
235+
236+ if (!bool.Parse(result))
237+ {
238+ JunitXmlDocument.FailureResult fr = new JunitXmlDocument.FailureResult();
239+ fr.Message = "Expected : " + filter_attr.Value + "\n actual : " + expr;
240+ fr.File = file;
241+ fr.Line = line;
242+ fr_list.Add(fr);
243+ }
244+ }
245+ }
246+ catch (Exception e)
247+ {
248+ Console.WriteLine(e.Message);
249+ }
250+ #endregion
251+ }
252+
253+ test_sw.Stop();
254+ if (fr_list.Count > 0)
255+ {
256+ ++failure_count;
257+ }
258+ junitDoc.AppendTestCase(TestSuite
259+ , name
260+ , true
261+ , test_sw.Elapsed
262+ , fr_list
263+ );
264+ #endregion
265+ }
266+ test_case_sw.Stop();
267+
268+ failure_total_count += failure_count;
269+ TestSuite.Attributes["failures"].Value = failure_count.ToString();
270+ TestSuite.Attributes["time"].Value = test_case_sw.Elapsed.TotalSeconds.ToString();
271+ }
272+ }
273+ catch (Exception e)
274+ {
275+ Console.WriteLine(e.Message);
276+ }
277+ }
278+ #endregion
279+ }
280+ }
281+ catch (Exception e)
282+ {
283+ Console.WriteLine(e.Message);
284+ }
285+ }
286+ #endregion
287+
288+ #region テストの終了処理
289+ test_suites_sw.Stop();
290+
291+ TestSuites.Attributes["tests"].Value = test_total_count.ToString();
292+ TestSuites.Attributes["failures"].Value = failure_total_count.ToString();
293+ TestSuites.Attributes["time"].Value = test_suites_sw.Elapsed.TotalSeconds.ToString();
294+
295+ junitDoc.Save(outfile);
296+ #endregion
297+
298+ return 0;
299+ }
300+ }
301+}
302+
303+#region XmlToXPathList
304+class XmlToXPathList
305+{
306+ public static List<string> Convert(XmlNode node)
307+ {
308+ List<string> list = new List<string>();
309+ if (node.ChildNodes.Count == 0)
310+ {
311+ string path = node.Name;
312+ XmlNode p = node.ParentNode;
313+ while (p != null && p.ParentNode != null)
314+ {
315+ path = p.Name + "/" + path;
316+ p = p.ParentNode;
317+ }
318+ path = "//" + path;
319+ list.Add(path);
320+ }
321+ foreach (XmlNode n in node.ChildNodes)
322+ {
323+ list.AddRange(Convert(n));
324+ }
325+ return list;
326+ }
327+ public static List<string> Convert(XmlDocument doc)
328+ {
329+ List<string> list = new List<string>();
330+
331+ foreach (XmlNode n in doc.ChildNodes)
332+ {
333+ list.AddRange(Convert(n));
334+ }
335+ return list;
336+ }
337+}
338+
339+#endregion
--- trunk/src/Properties/AssemblyInfo.cs (nonexistent)
+++ trunk/src/Properties/AssemblyInfo.cs (revision 2)
@@ -0,0 +1,36 @@
1+using System.Reflection;
2+using System.Runtime.CompilerServices;
3+using System.Runtime.InteropServices;
4+
5+// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
6+// アセンブリに関連付けられている情報を変更するには、
7+// これらの属性値を変更してください。
8+[assembly: AssemblyTitle("c4ju")]
9+[assembly: AssemblyDescription("")]
10+[assembly: AssemblyConfiguration("")]
11+[assembly: AssemblyCompany("")]
12+[assembly: AssemblyProduct("c4ju")]
13+[assembly: AssemblyCopyright("Copyright © 2011 Takazumi Shirayanagi")]
14+[assembly: AssemblyTrademark("")]
15+[assembly: AssemblyCulture("")]
16+
17+// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから
18+// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、
19+// その型の ComVisible 属性を true に設定してください。
20+[assembly: ComVisible(false)]
21+
22+// 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です
23+[assembly: Guid("38db0d80-10b0-4cde-a82c-9d27d5cea0eb")]
24+
25+// アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
26+//
27+// Major Version
28+// Minor Version
29+// Build Number
30+// Revision
31+//
32+// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
33+// 既定値にすることができます:
34+// [assembly: AssemblyVersion("1.0.*")]
35+[assembly: AssemblyVersion("1.0.0.0")]
36+[assembly: AssemblyFileVersion("1.0.0.0")]
--- trunk/src/JunitXml.cs (nonexistent)
+++ trunk/src/JunitXml.cs (revision 2)
@@ -0,0 +1,152 @@
1+//======================================================================
2+//-----------------------------------------------------------------------
3+/**
4+ * @file JunitXml.cs
5+ * @brief Junit XmlHelper ファイル
6+ *
7+ * @author t.sirayanagi
8+*/
9+//-----------------------------------------------------------------------
10+//======================================================================
11+
12+//======================================================================
13+// using
14+using System;
15+using System.Xml;
16+using System.Collections.Generic;
17+
18+namespace junit
19+{
20+ class JunitXmlDocument : XmlDocument
21+ {
22+ #region FailureResult
23+ public class FailureResult
24+ {
25+ string m_message;
26+ string m_file;
27+ int m_line;
28+
29+ public string Message
30+ {
31+ get { return m_message; }
32+ set { m_message = value; }
33+ }
34+ public string File
35+ {
36+ get { return m_file; }
37+ set { m_file = value; }
38+ }
39+ public int Line
40+ {
41+ get { return m_line; }
42+ set { m_line = value; }
43+ }
44+ }
45+ #endregion
46+
47+ public XmlNode AppendTestSuites(string name, int test_count, int failure_count, int disable_const, TimeSpan elapsed_time)
48+ {
49+ XmlNode node = CreateElement("testsuites");
50+ XmlAttribute attrTests = CreateAttribute("tests");
51+ XmlAttribute attrFailures = CreateAttribute("failures");
52+ XmlAttribute attrDisabled = CreateAttribute("disabled");
53+ XmlAttribute attrTime = CreateAttribute("time");
54+ XmlAttribute attrName = CreateAttribute("name");
55+ attrTests.Value = test_count.ToString();
56+ attrFailures.Value = failure_count.ToString();
57+ attrDisabled.Value = disable_const.ToString();
58+ attrTime.Value = elapsed_time.TotalSeconds.ToString();
59+ attrName.Value = name;
60+ node.Attributes.Append(attrTests);
61+ node.Attributes.Append(attrFailures);
62+ node.Attributes.Append(attrDisabled);
63+ node.Attributes.Append(attrTime);
64+ node.Attributes.Append(attrName);
65+
66+ return AppendChild(node);
67+ }
68+
69+ public XmlNode AppendTestSuite(string name, int test_count, int failure_count, int disable_const, TimeSpan elapsed_time)
70+ {
71+ XmlNode node = CreateElement("testsuite");
72+ XmlAttribute attrName = CreateAttribute("name");
73+ XmlAttribute attrTests = CreateAttribute("tests");
74+ XmlAttribute attrFailures = CreateAttribute("failures");
75+ XmlAttribute attrDisabled = CreateAttribute("disabled");
76+ XmlAttribute attrTime = CreateAttribute("time");
77+ XmlAttribute attrErrors = CreateAttribute("errors");
78+ attrName.Value = name;
79+ attrTests.Value = test_count.ToString();
80+ attrFailures.Value = failure_count.ToString();
81+ attrDisabled.Value = disable_const.ToString();
82+ attrTime.Value = elapsed_time.TotalSeconds.ToString();
83+ attrErrors.Value = "0";
84+ node.Attributes.Append(attrName);
85+ node.Attributes.Append(attrTests);
86+ node.Attributes.Append(attrFailures);
87+ node.Attributes.Append(attrDisabled);
88+ node.Attributes.Append(attrTime);
89+ node.Attributes.Append(attrErrors);
90+
91+ XmlNode parent = SelectSingleNode("testsuites");
92+ if (parent == null) return null;
93+ return parent.AppendChild(node);
94+ }
95+
96+ public XmlNode AppendTestCase(XmlNode testsuite, string name, bool is_run, TimeSpan elapsed_time, List<FailureResult> results)
97+ {
98+ if (testsuite == null) return null;
99+ XmlNode node = CreateElement("testcase");
100+ XmlAttribute attrName = CreateAttribute("name");
101+ XmlAttribute attrStatus = CreateAttribute("status");
102+ XmlAttribute attrClassName = CreateAttribute("classname");
103+ XmlAttribute attrTime = CreateAttribute("time");
104+ attrName.Value = name;
105+ attrStatus.Value = is_run ? "run" : "notrun";
106+ attrClassName.Value = testsuite.Attributes["name"].Value;
107+ attrTime.Value = elapsed_time.TotalSeconds.ToString();
108+
109+ node.Attributes.Append(attrName);
110+ node.Attributes.Append(attrStatus);
111+ node.Attributes.Append(attrClassName);
112+ node.Attributes.Append(attrTime);
113+
114+ if (results != null)
115+ {
116+ foreach (FailureResult r in results)
117+ {
118+ XmlNode failure = CreateElement("failure");
119+ XmlAttribute attrMessage = CreateAttribute("message");
120+ XmlAttribute attrType = CreateAttribute("type");
121+ string data = r.File + ":" + r.Line + "\n" + r.Message;
122+ XmlCDataSection cdata = CreateCDataSection(data);
123+
124+ attrMessage.Value = r.Message;
125+ attrType.Value = "";
126+
127+ failure.AppendChild(cdata);
128+ failure.Attributes.Append(attrMessage);
129+ failure.Attributes.Append(attrType);
130+
131+ node.AppendChild(failure);
132+ }
133+ }
134+ return testsuite.AppendChild(node);
135+ }
136+ }
137+
138+} // end of namespace crisp
139+
140+
141+#region UNITTEST
142+#if CRISP_UNITTEST
143+
144+namespace crisp
145+{
146+
147+
148+}
149+
150+#endif
151+#endregion
152+
--- trunk/bin/filter_default.xml (nonexistent)
+++ trunk/bin/filter_default.xml (revision 2)
@@ -0,0 +1,15 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<CCCC_Project>
3+<module_summary>
4+<lines_of_code value="value &lt;= 120" />
5+</module_summary>
6+<procedural_detail>
7+<member_function>
8+<lines_of_code value="value &lt;= 30"/>
9+<McCabes_cyclomatic_complexity value="value &lt;= 30" />
10+<lines_of_comment />
11+<lines_of_code_per_line_of_comment value="value &lt;= 5" />
12+<McCabes_cyclomatic_complexity_per_line_of_comment value="value &lt;= 30" />
13+</member_function>
14+</procedural_detail>
15+</CCCC_Project>
--- trunk/COPYING (nonexistent)
+++ trunk/COPYING (revision 2)
@@ -0,0 +1,165 @@
1+ GNU LESSER GENERAL PUBLIC LICENSE
2+ Version 3, 29 June 2007
3+
4+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5+
6+ Everyone is permitted to copy and distribute verbatim
7+copies of this license document, but changing it is not allowed.
8+
9+ This version of the GNU Lesser General Public License incorporates
10+the terms and conditions of version 3 of the GNU General Public
11+License, supplemented by the additional permissions listed below.
12+
13+0. Additional Definitions.
14+
15+ As used herein, "this License" refers to version 3 of the GNU Lesser
16+General Public License, and the "GNU GPL" refers to version 3 of the GNU
17+General Public License.
18+
19+ "The Library" refers to a covered work governed by this License,
20+other than an Application or a Combined Work as defined below.
21+
22+ An "Application" is any work that makes use of an interface provided
23+by the Library, but which is not otherwise based on the Library.
24+Defining a subclass of a class defined by the Library is deemed a mode
25+of using an interface provided by the Library.
26+
27+ A "Combined Work" is a work produced by combining or linking an
28+Application with the Library. The particular version of the Library
29+with which the Combined Work was made is also called the "Linked
30+Version".
31+
32+ The "Minimal Corresponding Source" for a Combined Work means the
33+Corresponding Source for the Combined Work, excluding any source code
34+for portions of the Combined Work that, considered in isolation, are
35+based on the Application, and not on the Linked Version.
36+
37+ The "Corresponding Application Code" for a Combined Work means the
38+object code and/or source code for the Application, including any data
39+and utility programs needed for reproducing the Combined Work from the
40+Application, but excluding the System Libraries of the Combined Work.
41+
42+1. Exception to Section 3 of the GNU GPL.
43+
44+ You may convey a covered work under sections 3 and 4 of this License
45+without being bound by section 3 of the GNU GPL.
46+
47+2. Conveying Modified Versions.
48+
49+ If you modify a copy of the Library, and, in your modifications, a
50+facility refers to a function or data to be supplied by an Application
51+that uses the facility (other than as an argument passed when the
52+facility is invoked), then you may convey a copy of the modified
53+version:
54+
55+ a) under this License, provided that you make a good faith effort to
56+ ensure that, in the event an Application does not supply the
57+ function or data, the facility still operates, and performs
58+ whatever part of its purpose remains meaningful, or
59+
60+ b) under the GNU GPL, with none of the additional permissions of
61+ this License applicable to that copy.
62+
63+ 3. Object Code Incorporating Material from Library Header Files.
64+
65+ The object code form of an Application may incorporate material from
66+a header file that is part of the Library. You may convey such object
67+code under terms of your choice, provided that, if the incorporated
68+material is not limited to numerical parameters, data structure
69+layouts and accessors, or small macros, inline functions and templates
70+(ten or fewer lines in length), you do both of the following:
71+
72+ a) Give prominent notice with each copy of the object code that the
73+ Library is used in it and that the Library and its use are
74+ covered by this License.
75+
76+ b) Accompany the object code with a copy of the GNU GPL and this license
77+ document.
78+
79+4. Combined Works.
80+
81+ You may convey a Combined Work under terms of your choice that,
82+taken together, effectively do not restrict modification of the
83+portions of the Library contained in the Combined Work and reverse
84+engineering for debugging such modifications, if you also do each of
85+the following:
86+
87+ a) Give prominent notice with each copy of the Combined Work that
88+ the Library is used in it and that the Library and its use are
89+ covered by this License.
90+
91+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92+ document.
93+
94+ c) For a Combined Work that displays copyright notices during
95+ execution, include the copyright notice for the Library among
96+ these notices, as well as a reference directing the user to the
97+ copies of the GNU GPL and this license document.
98+
99+ d) Do one of the following:
100+
101+ 0) Convey the Minimal Corresponding Source under the terms of this
102+ License, and the Corresponding Application Code in a form
103+ suitable for, and under terms that permit, the user to
104+ recombine or relink the Application with a modified version of
105+ the Linked Version to produce a modified Combined Work, in the
106+ manner specified by section 6 of the GNU GPL for conveying
107+ Corresponding Source.
108+
109+ 1) Use a suitable shared library mechanism for linking with the
110+ Library. A suitable mechanism is one that (a) uses at run time
111+ a copy of the Library already present on the user's computer
112+ system, and (b) will operate properly with a modified version
113+ of the Library that is interface-compatible with the Linked
114+ Version.
115+
116+ e) Provide Installation Information, but only if you would otherwise
117+ be required to provide such information under section 6 of the
118+ GNU GPL, and only to the extent that such information is
119+ necessary to install and execute a modified version of the
120+ Combined Work produced by recombining or relinking the
121+ Application with a modified version of the Linked Version. (If
122+ you use option 4d0, the Installation Information must accompany
123+ the Minimal Corresponding Source and Corresponding Application
124+ Code. If you use option 4d1, you must provide the Installation
125+ Information in the manner specified by section 6 of the GNU GPL
126+ for conveying Corresponding Source.)
127+
128+5. Combined Libraries.
129+
130+ You may place library facilities that are a work based on the
131+Library side by side in a single library together with other library
132+facilities that are not Applications and are not covered by this
133+License, and convey such a combined library under terms of your
134+choice, if you do both of the following:
135+
136+ a) Accompany the combined library with a copy of the same work based
137+ on the Library, uncombined with any other library facilities,
138+ conveyed under the terms of this License.
139+
140+ b) Give prominent notice with the combined library that part of it
141+ is a work based on the Library, and explaining where to find the
142+ accompanying uncombined form of the same work.
143+
144+6. Revised Versions of the GNU Lesser General Public License.
145+
146+ The Free Software Foundation may publish revised and/or new versions
147+of the GNU Lesser General Public License from time to time. Such new
148+versions will be similar in spirit to the present version, but may
149+differ in detail to address new problems or concerns.
150+
151+ Each version is given a distinguishing version number. If the
152+Library as you received it specifies that a certain numbered version
153+of the GNU Lesser General Public License "or any later version"
154+applies to it, you have the option of following the terms and
155+conditions either of that published version or of any later version
156+published by the Free Software Foundation. If the Library as you
157+received it does not specify a version number of the GNU Lesser
158+General Public License, you may choose any version of the GNU Lesser
159+General Public License ever published by the Free Software Foundation.
160+
161+ If the Library as you received it specifies that a proxy can decide
162+whether future versions of the GNU Lesser General Public License shall
163+apply, that proxy's public statement of acceptance of any version is
164+permanent authorization for you to choose that version for the
165+Library.
--- trunk/readme.txt (nonexistent)
+++ trunk/readme.txt (revision 2)
@@ -0,0 +1,49 @@
1+readme.txt for c4ju
2+===================
3+
4+--------------------------------------------------
5+Name
6+
7+ c4ju - CCCC output xml to junit xml
8+
9+--------------------------------------------------
10+Usage
11+
12+ c4ju [options] file1.xml ...
13+ Process files listed on command line.
14+ If the filenames include '-', read a list of files from standard input.
15+
16+--------------------------------------------------
17+Command Line Options
18+
19+ --help : generate help message.
20+ --out_xmlfile=<path> : path of xml report.
21+ --filter=<path> : path of test filter xml.
22+
23+--------------------------------------------------
24+Description
25+
26+CCCC 出力xml から filter xml に記述した式でテストを行い
27+xml report を出力します。
28+
29+==== sample filter xml ====
30+<?xml version="1.0" encoding="utf-8"?>
31+<CCCC_Project>
32+<module_summary>
33+<lines_of_code value="value &lt;= 120" />
34+</module_summary>
35+<procedural_detail>
36+<member_function>
37+<lines_of_code value="value &lt;= 30"/>
38+<McCabes_cyclomatic_complexity value="value &lt;= 30" />
39+<lines_of_comment />
40+<lines_of_code_per_line_of_comment value="value &lt;= 5" />
41+<McCabes_cyclomatic_complexity_per_line_of_comment value="value &lt;= 30" />
42+</member_function>
43+</procedural_detail>
44+</CCCC_Project>
45+============================
46+
47+対応するノードの属性に式を記述します。
48+value にテスト対象の属性値が代入されます。
49+
Show on old repository browser