Skip to content

Commit

Permalink
Added readme for format command.
Browse files Browse the repository at this point in the history
changed a mistake in the README.
  • Loading branch information
teizenman committed Jan 5, 2020
1 parent 2a3dc68 commit 0c4142f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ Format your integration/script/playbook yml file according to Demisto's standard
**Arguments**:
* *-t {integration, script, playbook}, --type {integration, script, playbook}*
The type of yml file to be formatted.
* *-p PATH_TO_YML, --path PATH_TO_YML*
* *-s PATH_TO_YML, --source-file PATH_TO_YML*
The path of the desired yml file to be formatted.
* *-o DESIRED_OUTPUT_PATH, --output_file DESIRED_OUTPUT_PATH*
The path where the formatted file will be saved to. (Default will be to override origin file)

**Examples**:
` demisto-sdk format -t integration -p Integrations/Pwned-V2/Pwned-V2.yml`.
` demisto-sdk format -t integration -s Integrations/Pwned-V2/Pwned-V2.yml`.
This will go through the integration file, format it, and override the original file with the necessary changes.

### [Run-playbook](https://github.com/demisto/demisto-sdk/tree/master/docs/run_playbook_command.md)
Expand Down
39 changes: 39 additions & 0 deletions docs/format_command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## Format

**Format Integration/Script/Playbook YML files according to Demisto's standard.**

### Use Cases
This command is used in order to keep your new or modified YML file with Demisto's standard. This is useful especially
when developing a new integration/script/playbook, and you want to make sure you are keeping up with our standards.
When done formatting, the **validate** command will run, to let you know of things the formatter could not fix.

### Arguments
* **-t {integration, script, playbook}, --type {integration, script, playbook}**

The type of yml file to be formatted.

* **-s PATH_TO_YML, --source-file PATH_TO_YML**

The path of the desired yml file to be formatted.

* **-o DESIRED_OUTPUT_PATH, --output_file DESIRED_OUTPUT_PATH**

The path where the formatted file will be saved to. (Default will be to override origin file)


### Examples
```
demisto-sdk format -t integration -s Integrations/Pwned-V2/Pwned-V2.yml
```
This will go through the integration file, format it, and override the original file with the necessary changes.
<br/><br/>
```
demisto-sdk format -t integration -s Integrations/Pwned-V2/Pwned-V2.yml -o Integrations/Pwned-V2/formatted-Pwned-V2.yml
```
This will go through the integration file, format it, and save it to a new file
(Integrations/Pwned-V2/formatted-Pwned-V2.yml) with the necessary changes, while keeping the origin file as it was.
<br/><br/>
```
demisto-sdk format -t script -s Scripts/FilterByList/FilterByList.yml
```
This will go through the script file, format it, and override the original file with the necessary changes.

0 comments on commit 0c4142f

Please sign in to comment.