format - Demisto SDK Guide - Cortex - Security Operations

Demisto SDK Guide

Creation date
2023-08-01
Last date published
2024-12-22
Category
Demisto SDK Guide
Abstract

The format command formats content you create to match Cortex standards.

This command formats new or modified files to align with the Cortex standard. This is useful when developing a new integration, script, playbook, incident field, incident type, indicator field, indicator type, layout, or dashboard. When formatting is complete, the validate command runs and notifies you of any issues the formatter could not fix.

Set the fromVersion key in different files

Run without the fromVersion flag
If the source file name already exists in the content repository
  • If the fromVersion key exists already in the current file, the fromVersion key will not change.

  • If the fromVersion key does not exist in the current file:

    • If the fromVersion key exists in an old file in the content repository, set the fromVersion key as in the old file.

    • If the fromVersion key does not exist in an old file in the content repository, the system sets the fromVersion key to default 1.0.0.

If the source file name does not exist in content repository
  • If the fromVersion key exists already in the current file, the fromversion key will not change.

  • If the fromVersion key does not exist in the current file, the system sets the fromVersion key to 5.0.0.

Run with the fromVersion flag
  • If the fromVersion key exists already in the current file, the system sets the fromVersion key to the required version.

  • If the fromVersion key does not exist in the current file, add the fromVersion key and set it to the required version.