@@ -76,17 +76,18 @@ To view the available options and commands, run `codeanalyzer --help`. You shoul
76
76
Static Analysis on Python source code using Jedi, CodeQL and Tree sitter.
77
77
78
78
79
- ╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
80
- │ * --input -i PATH Path to the project root directory. [default: None] [required] │
81
- │ --output -o PATH Output directory for artifacts. [default: None] │
82
- │ --analysis-level -a INTEGER 1: symbol table, 2: call graph. [default: 1] │
83
- │ --codeql --no-codeql Enable CodeQL-based analysis. [default: no-codeql] │
84
- │ --eager --lazy Enable eager or lazy analysis. Defaults to lazy. [default: lazy] │
85
- │ --cache-dir -c PATH Directory to store analysis cache. [default: None] │
86
- │ --clear-cache --keep-cache Clear cache after analysis. [default: clear-cache] │
87
- │ -v INTEGER Increase verbosity: -v, -vv, -vvv [default: 0] │
88
- │ --help Show this message and exit. │
89
- ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
79
+ ╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
80
+ │ * --input -i PATH Path to the project root directory. [default: None] [required] │
81
+ │ --output -o PATH Output directory for artifacts. [default: None] │
82
+ │ --format -f [json| msgpack] Output format: json or msgpack. [default: json] │
83
+ │ --analysis-level -a INTEGER 1: symbol table, 2: call graph. [default: 1] │
84
+ │ --codeql --no-codeql Enable CodeQL-based analysis. [default: no-codeql] │
85
+ │ --eager --lazy Enable eager or lazy analysis. Defaults to lazy. [default: lazy] │
86
+ │ --cache-dir -c PATH Directory to store analysis cache. [default: None] │
87
+ │ --clear-cache --keep-cache Clear cache after analysis. [default: clear-cache] │
88
+ │ -v INTEGER Increase verbosity: -v, -vv, -vvv [default: 0] │
89
+ │ --help Show this message and exit. │
90
+ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
90
91
```
91
92
92
93
### Examples
@@ -104,7 +105,14 @@ To view the available options and commands, run `codeanalyzer --help`. You shoul
104
105
105
106
Now, you can find the analysis results in ` analysis.json ` in the specified directory.
106
107
107
- 2 . ** Toggle analysis levels with ` --analysis-level ` :**
108
+ 2 . ** Change output format to msgpack:**
109
+ ``` bash
110
+ codeanalyzer --input ./my-python-project --output /path/to/analysis-results --format msgpack
111
+ ```
112
+
113
+ This will save the analysis results in ` analysis.msgpack ` in the specified directory.
114
+
115
+ 3 . ** Toggle analysis levels with ` --analysis-level ` :**
108
116
``` bash
109
117
codeanalyzer --input ./my-python-project --analysis-level 1 # Symbol table only
110
118
```
@@ -114,30 +122,30 @@ To view the available options and commands, run `codeanalyzer --help`. You shoul
114
122
```
115
123
*** Note: The ` --analysis-level=2 ` is not yet implemented in this version.***
116
124
117
- 3 . ** Analysis with CodeQL enabled:**
125
+ 4 . ** Analysis with CodeQL enabled:**
118
126
``` bash
119
127
codeanalyzer --input ./my-python-project --codeql
120
128
```
121
129
This will perform CodeQL-based analysis in addition to the standard symbol table generation.
122
130
123
131
*** Note: Not yet fully implemented. Please refrain from using this option until further notice.***
124
132
125
- 4 . ** Eager analysis with custom cache directory:**
133
+ 5 . ** Eager analysis with custom cache directory:**
126
134
``` bash
127
135
codeanalyzer --input ./my-python-project --eager --cache-dir /path/to/custom-cache
128
136
```
129
137
This will rebuild the analysis cache at every run and store it in ` /path/to/custom-cache/.codeanalyzer ` . The cache will be cleared by default after analysis unless you specify ` --keep-cache ` .
130
138
131
139
If you provide --cache-dir, the cache will be stored in that directory. If not specified, it defaults to ` .codeanalyzer ` in the current working directory (` $PWD ` ).
132
140
133
- 5 . ** Quiet mode (minimal output):**
141
+ 6 . ** Quiet mode (minimal output):**
134
142
``` bash
135
143
codeanalyzer --input /path/to/my-python-project --quiet
136
144
```
137
145
138
- ### Output
146
+ ## Output
139
147
140
- By default, analysis results are printed to stdout in JSON format. When using the ` --output ` option, results are saved to ` analysis.json ` in the specified directory.
148
+ By default, analysis results are printed to stdout in JSON format. When using the ` --output ` option, results are saved to ` analysis.json ` in the specified directory. If you use the ` --format=msgpack ` option, the results will be saved in ` analysis.msgpack ` , which is a binary format that can be more efficient for storage and transmission.
141
149
142
150
## Development
143
151
0 commit comments