Configuration - evg4b/fisherman GitHub Wiki

Fisherman supports a variety of configuration options to configure its behavior and customize the hooks it manages.

Formats

Fisherman supports several formats for configuration files, including:

  • TOML: The default format for configuration files. It is human-readable and easy to edit.
  • YAML: A popular format for configuration files that is also human-readable. Fisherman supports YAML files with the .yaml or .yml extensions.
  • JSON: A widely-used format for data interchange. Fisherman supports JSON files with the .json extension.

Idiomatically, Fisherman uses the .fisherman.toml file for configuration, but you can also use .fisherman.yaml or .fisherman.json files if you prefer.

Scopes concept

Fisherman uses scoped configuration files to simplify hooks re-usage. Configuration file location determines the scope of the configuration.

Global scope

Configuration file located in the user's home directory (~/.fisherman.toml).

These files apply to all repositories on the system.

Recommended for common rules that you want to use in all your repositories.

Repository scope

Configuration file located in the root of the Git repository (/path/to/repo/.fisherman.toml).

These files apply only to the current repository.

Recommended for repository-specific rules that you want to share via git.

Local scope

Configuration file located in the .git directory of the Git repository (/path/to/repo/.git/fisherman.toml).

These files apply only to the current repository and are not shared with other developers.

Recommended for repository-specific rules that you do not want to add to the repository.

Configuration file structure

Fisherman configuration files are structured in a way that allows you to define hooks, rules, and other settings.

extract = ["<extract>", "<extract>"]
[[hooks.<hook>]]
type = "type"
# configuration for the rule
[[hooks.<hook>]]
type = "type"
# configuration for the rule
⚠️ **GitHub.com Fallback** ⚠️