pre-commit - Demisto SDK Guide - Cortex - Security Operations

Demisto SDK Guide

Creation date
2023-08-01
Last date published
2024-10-28
Category
Demisto SDK Guide
Abstract

The pre-commit command runs checks and linters and generates a YAML file based on the content run.

This command enhances the content development experience by running a variety of checks and linters. It utilizes the pre-commit framework for managing and maintaining multi-language pre-commit hooks. A .pre-commit-config-template.yaml file is used to configure the hooks if they are found in the content repository. Otherwise, a default is used.

Since content items run in containers with different Python versions and dependencies, this command matches content items with similar configurations before passing the generated temporary .pre-commit-config.yaml file.

Note

An internet connection is required to use pre-commit.