Skip to content

Commit 38b94f9

Browse files
0xedwardfacebook-github-bot
authored andcommitted
Add code formatting to code blocks in SAPP docs
Summary: Adding pretty syntax highlighting to code blocks on docs Reviewed By: gbleaney Differential Revision: D28364971 fbshipit-source-id: c11df9af319c1e3b49830d836c74b4e4d6f0460a
1 parent 0296bb0 commit 38b94f9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ SAPP functionality can be accessed through the web interface or through a subcom
173173

174174
### File Format
175175
A filter is required to have a `name` and at least one other key, excluding `description`. Filters can be stored as JSON in the following format:
176-
```
176+
```json
177177
{
178178
"name": "Name of filter",
179179
"description": "Description for the filter",
@@ -223,61 +223,61 @@ You can find some example filters to reference in the [pyre-check repo](https://
223223

224224
### Importing filters
225225
You can import a filter from a file by running:
226-
```
226+
```shell
227227
[~/example]$ sapp --database-name sapp.db filter import filter-filename.json
228228
```
229229

230230
You can also import all filters within a directory by running:
231-
```
231+
```shell
232232
[~/example]$ sapp --database-name sapp.db filter import path/to/list_of_filters
233233
```
234234

235235
### Deleting filters
236236
You can delete filters by name with:
237-
```
237+
```shell
238238
[~/example]$ sapp --database-name sapp.db filter delete "filter name 1" "filter name 2" "filter name 3"
239239
```
240240

241241
### Filtering list of issues
242242
You can apply a filter to a list of issues by run number. For example, the following command will show you a list of issues after applying `example-filter` to run `1`:
243-
```
243+
```shell
244244
[~/example]$ sapp --database-name sapp.db filter issues 1 example-filter.json
245245
```
246246

247247
You can also apply a list of filters to a single list of issues by run number. SAPP will apply each filter individually from the directory you specify to the list of issues and merge results into a single list of issues to show you. For example, the following command will show you a list of issues after applying every filter in `list_of_filters` to run `1`:
248-
```
248+
```shell
249249
[~/example]$ sapp --database-name sapp.db filter issues 1 path/to/list_of_filters
250250
```
251251

252252

253253
## Development Environment Setup
254254
Start by cloning the repo and setting up a virtual environment:
255-
```
255+
```shell
256256
$ git clone [email protected]:facebook/sapp.git && cd sapp
257257
$ python3 -m venv ~/.venvs/sapp
258258
$ source ~/.venvs/sapp/bin/activate
259259
(sapp) $ pip3 install -r requirements.txt
260260
```
261261

262262
Run the flask server:
263-
```
263+
```shell
264264
(sapp) $ python3 -m sapp.cli server
265265
```
266266

267267
Parse static analysis output and save to disk:
268-
```
268+
```shell
269269
(sapp) $ python3 -m sapp.cli analyze taint-output.json
270270
```
271271

272272
If you make any changes to files under `sapp/ui/frontend/*`, you will need to run `npm install` once to install dependencies and `npm run-script build` each time you make changes before running the flask server to see the changes you made reflected:
273273

274274
Installing dependencies:
275-
```
275+
```shell
276276
(sapp) $ cd sapp/ui/frontend && npm install
277277
```
278278

279279
Build static files and run the flask server:
280-
```
280+
```shell
281281
(sapp) $ cd sapp/ui/frontend && npm run-script build
282282
(sapp) $ python3 -m sapp.cli server --debug
283283
```

0 commit comments

Comments
 (0)