Skip to content

Commit c6ea9c7

Browse files
committed
Add overview report for Typescript
1 parent 1290f57 commit c6ea9c7

File tree

5 files changed

+556
-3
lines changed

5 files changed

+556
-3
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Number of moduleElements per module for Typescript
2+
3+
MATCH (module:TS:Module)-[:EXPORTS]->(element:TS)
4+
OPTIONAL MATCH (module)<-[:CONTAINS]-(project:TS:Project)-[:HAS_ROOT]->(projectRoot:Directory)
5+
WITH module.name AS moduleName
6+
,replace(module.globalFqn,
7+
coalesce(projectRoot.absoluteFileName + '/', ''),
8+
'') AS modulePath
9+
,module.globalFqn AS fullQualifiedModuleName
10+
,count(DISTINCT element) AS numberOfModuleElements
11+
,collect(DISTINCT element) AS moduleElements
12+
UNWIND moduleElements AS element
13+
WITH moduleName
14+
,modulePath
15+
,fullQualifiedModuleName
16+
,numberOfModuleElements
17+
,element
18+
,labels(element) AS elementLabels
19+
UNWIND elementLabels AS typeLabel
20+
WITH moduleName
21+
,modulePath
22+
,fullQualifiedModuleName
23+
,numberOfModuleElements
24+
,element
25+
,typeLabel
26+
WHERE NOT typeLabel IN ['TS', 'ExternalDeclaration']
27+
RETURN moduleName
28+
,modulePath
29+
,fullQualifiedModuleName
30+
,numberOfModuleElements
31+
,typeLabel AS languageElement
32+
,count(element) AS numberOfElements
33+
ORDER BY numberOfModuleElements DESC, moduleName ASC
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Overview size for Typescript
2+
3+
MATCH (n)
4+
WITH COUNT(n) AS nodeCount
5+
MATCH ()-[]->()
6+
WITH nodeCount
7+
,count(*) AS relationshipCount
8+
MATCH (a:TS&Project)
9+
WITH nodeCount
10+
,relationshipCount
11+
,count(DISTINCT a) AS projectCount
12+
MATCH (p:TS&Module)
13+
WITH nodeCount
14+
,relationshipCount
15+
,projectCount
16+
,count(DISTINCT p.globalFqn) AS moduleCount
17+
MATCH (function:TS&Function)
18+
WITH nodeCount
19+
,relationshipCount
20+
,projectCount
21+
,moduleCount
22+
,count(DISTINCT function) AS functionCount
23+
MATCH (object:TS&Object)
24+
WITH nodeCount
25+
,relationshipCount
26+
,projectCount
27+
,moduleCount
28+
,functionCount
29+
,count(DISTINCT object) AS objectCount
30+
MATCH (typeAlias:TS&TypeAlias)
31+
WITH nodeCount
32+
,relationshipCount
33+
,projectCount
34+
,moduleCount
35+
,functionCount
36+
,objectCount
37+
,count(DISTINCT typeAlias) AS typeAliasCount
38+
MATCH (interface:TS&Interface)
39+
WITH nodeCount
40+
,relationshipCount
41+
,projectCount
42+
,moduleCount
43+
,functionCount
44+
,objectCount
45+
,typeAliasCount
46+
,count(DISTINCT interface) AS interfaceCount
47+
MATCH (method:TS&Method)
48+
WITH nodeCount
49+
,relationshipCount
50+
,projectCount
51+
,moduleCount
52+
,functionCount
53+
,objectCount
54+
,typeAliasCount
55+
,interfaceCount
56+
,count(DISTINCT method) AS methodCount
57+
MATCH (class:TS&Class)
58+
WITH nodeCount
59+
,relationshipCount
60+
,projectCount
61+
,moduleCount
62+
,functionCount
63+
,objectCount
64+
,typeAliasCount
65+
,interfaceCount
66+
,methodCount
67+
,count(DISTINCT class) AS classCount
68+
RETURN nodeCount
69+
,relationshipCount
70+
,projectCount
71+
,moduleCount
72+
,functionCount
73+
,objectCount
74+
,typeAliasCount
75+
,interfaceCount
76+
,classCount
77+
,methodCount

jupyter/OverviewJava.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"id": "2f0eabc4",
77
"metadata": {},
88
"source": [
9-
"# Overview\n",
9+
"# Overview for Java\n",
1010
"<br> \n",
1111
"\n",
1212
"### References\n",
@@ -508,9 +508,9 @@
508508
"name": "python",
509509
"nbconvert_exporter": "python",
510510
"pygments_lexer": "ipython3",
511-
"version": "3.11.4"
511+
"version": "3.11.9"
512512
},
513-
"title": "Object Oriented Design Quality Metrics for Java with Neo4j"
513+
"title": "Overview for Java"
514514
},
515515
"nbformat": 4,
516516
"nbformat_minor": 5

0 commit comments

Comments
 (0)