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
Copy file name to clipboardExpand all lines: README.md
+29-2Lines changed: 29 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,9 @@ This repository provides an alternative implementation to [Polystat](https://git
9
9
* A **directory** with the `.sarif.json` files, where each SARIF file corresponds to the file in the input directory.
10
10
* An **single file** where the outputs of the analyzers for all the analyzed files are aggregated in a single SARIF JSON object.
11
11
12
-
...and many minor quality-of-life improvements.
12
+
...and many minor quality-of-life improvements.
13
+
14
+
⚠ WARNING ⚠: The tool is still in the early stages of development, so feature suggestions and bug reports are more than welcome!
13
15
14
16
# Installation
15
17
The CLI is distributed as a fat jar (can be downloaded from [Github Releases](https://github.com/polystat/polystat-cli/releases)), so you can run without any prerequisites other than the [JRE](https://ru.wikipedia.org/wiki/Java_Runtime_Environment). If you have it installed, you can run `polystat-cli` by just executing:
This section covers all the options available in the CLI interface and their meanings.
85
87
86
88
## Notation
87
89
The description follows [this guide](https://en.wikipedia.org/wiki/Command-line_interface#Command_description_syntax).
@@ -140,6 +142,31 @@ If it's not present in the current working directory, download one from Maven Ce
140
142
*`--help` displays some informative help message for commands.
141
143
*`--config <path>` allows to configure Polystat from the specified HOCON config file. If not specified, reads configs from the file `.polystat.conf` in the current working directory.
142
144
145
+
# Configuration File
146
+
This section covers all the keys that can be used in the HOCON configuration files. The most relevant version of the information presented in this section can be printed to console by running:
147
+
```
148
+
$ polystat list --config
149
+
```
150
+
The example of the working config file can be found [here](.polystat.conf).
151
+
152
+
*`polystat.lang` - the type of input files which will be analyzed. This key must be present. Possible values:
153
+
* "java" - only ".java" files will be analyzed.
154
+
* "eo" - only ".eo" files will be analyzed.
155
+
* "python" - only ".py" files will be analyzed.
156
+
*`polystat.j2eoVersion` - specifies the version of J2EO to download.
157
+
*`polystat.j2eo` - specifies the path to the J2EO executable. If not specified, defaults to looking for j2eo.jar in the current working directory. If it's not found, downloads it from maven central. The download only happens when this key is NOT provided.
158
+
*`polystat.input` - specifies how the files are supplied to the analyzer. Can be either a path to a directory, path to a file, or absent. If absent, the code is read from standard input.
159
+
*`polystat.tempDir` - the path to a directory where temporary analysis file will be stored. If not specified, defaults to an OS-generated temporary directory.
160
+
*`polystat.outputTo` - the path to a directory where the results of the analysis are stored. If not specified, the results will be printed to console.
161
+
*`polystat.outputFormats` - the formats for which output is generated. If it's an empty list or not specified, no output files are produced.
162
+
*`polystat.includeRules` | `polystat.excludeRules` - specified which rules should be included in / excluded from the analysis. If both are specified, polystat.includeRules takes precedence. The list of available rule specifiers can be found by running:
163
+
```
164
+
$ polystat.jar list
165
+
```
166
+
* `polystat.outputs.console` - specifies if the analysis results should be output to console. `false` by default.
167
+
* `polystat.outputs.dirs` - a list of directories to write files to.
168
+
* `polystat.outputs.files` - a list of files to write aggregated output to.
169
+
143
170
# Development
144
171
## Setup
145
172
This is an sbt Scala project. In order to build the project you need the following:
0 commit comments