You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Create the `artifacts` directory for the code to be analyzed (without `cd` afterwards).
51
+
- Initialize you analysis project using [./init.sh](./init.sh).
62
52
63
53
```shell
64
-
mkdir artifacts
54
+
./init.sh MyAnalysisProjectName
65
55
```
66
56
67
-
1. Move the artifacts (e.g. Java jars json files) you want to analyze into the `artifacts` directory.
57
+
### 2. Prepare the code to be analyzed
58
+
59
+
- Move the artifacts (e.g. Java jars json files) you want to analyze into the `artifacts` directory.
68
60
69
-
1. If you want to analyze Typescript code, create a symbolic link inside the `source` directory that points to the Typescript project or copy the project into it.
61
+
- If you want to analyze Typescript code, create a symbolic link inside the `source` directory that points to the Typescript project. Alternatively you can also copy the project into the `source` directory.
70
62
71
-
1. If you want to include git data like changed files and authors, create a symbolic link inside the `source` directory that points to the repository or clone it in the `source` directory. If you already have your Typescript project in there, you of course don't have to do it twice. If you are analyzing Java artifacts (no source needed), it is sufficient to use a bare clone that only contains the git history without the sources using `git clone --bare`.
63
+
- If you want to include git data like changed files and authors, create a symbolic link inside the `source` directory that points to the repository or clone it into the `source` directory. If you already have your Typescript project in there, you of course don't have to do it twice. If you are analyzing Java artifacts (full source not needed), it is sufficient to use a bare clone that only contains the git history without the sources using `git clone --bare`.
72
64
73
-
1. Alternatively to the steps above, run an already predefined download script
65
+
- Alternatively to the steps above, run an already predefined download script
- All reports with Python, Conda, Node.js and npm installed:
93
+
- All reports with Python, Conda, Node.js and npm installed:
102
94
103
-
```shell
104
-
./../../scripts/analysis/analyze.sh
105
-
```
95
+
```shell
96
+
./../../scripts/analysis/analyze.sh
97
+
```
106
98
107
-
- To explore the database yourself without any automatically generated reports and no additional requirements:
99
+
- To explore the database yourself without any automatically generated reports and no additional requirements:
108
100
109
-
```shell
110
-
./../../scripts/analysis/analyze.sh --explore
111
-
```
101
+
```shell
102
+
./../../scripts/analysis/analyze.sh --explore
103
+
```
104
+
105
+
👉 Open your browser and login to your [local Neo4j Web UI](http://localhost:7474/browser) with "neo4j" as user and the initial password you've chosen.
112
106
113
-
Then open your browser and login to your [local Neo4j Web UI](http://localhost:7474/browser) with "neo4j" as user and the initial password you've chosen.
107
+
## GitHub Actions
114
108
115
-
👉 See [scripts/examples/analyzeAxonFramework.sh](./scripts/examples/analyzeAxonFramework.sh) as an example script that combines all the above steps for a Java Project.
116
-
👉 See [scripts/examples/analyzeReactRouter.sh](./scripts/examples/analyzeReactRouter.sh) as an example script that combines all the above steps for a Typescript Project.
117
-
👉 See [scripts/examples/analyzeAntDesign.sh](./scripts/examples/analyzeAntDesign.sh) as an example script that combines all the above steps for a large scale monorepo Typescript Project.
118
109
👉 See [Code Structure Analysis Pipeline](./.github/workflows/java-code-analysis.yml) on how to do this within a GitHub Actions Workflow.
echo"init: Error: Please execute the script in the root directory of the code-graph-analysis-pipeline repository.">&2
24
+
echo"init: Change to the directory of this ${nameOfThisScript} script and execute it from there.">&2
25
+
exit 1
26
+
fi
27
+
28
+
# Check if initial password environment variable is set
29
+
if [ -z"${NEO4J_INITIAL_PASSWORD}" ];then
30
+
echo"init: Error: Environment variable NEO4J_INITIAL_PASSWORD is recommended to be set first. Use 'export NEO4J_INITIAL_PASSWORD=<your-own-password>'."
31
+
exit 1
32
+
fi
33
+
34
+
# Create the temporary directory for all analysis projects if it hadn't been created yet.
35
+
mkdir -p ./temp
36
+
cd ./temp
37
+
38
+
# Create the analysis directory inside the temp directory using the given parameter if it hadn't been created yet.
39
+
mkdir -p "./${analysisName}"
40
+
cd"./${analysisName}"
41
+
42
+
# Create the artifacts directory inside the analysis directory for e.g. Java jar/ear files if it hadn't been created yet.
43
+
mkdir -p "./${ARTIFACTS_DIRECTORY}"
44
+
45
+
# Create the source directory inside the analysis directory for source code projects/repositories if it hadn't been created yet.
46
+
mkdir -p "./${SOURCE_DIRECTORY}"
47
+
48
+
# Create symbolic links to the most common scripts for code analysis.
0 commit comments