Skip to content

Configuration Sources

Sourcery reads configuration settings from three sources:

  • Personal configuration from a sourcery.yaml file on your system (see locations below)
  • Project configuration from a .sourcery.yaml file in the root of your project directory
  • Per-function inline configuration from your source code

Inline configuration takes precedence over project configuration, and project configuration takes precedence over user configuration.

See Reference: .sourcery.yaml for .sourcery.yaml configuration options.

See Reference: Inline Refactorings for per-function inline configuration options.

User Configuration File System Locations

Personal configuration is stored in a .sourcery.yaml file on your system. Its location is platform-dependent:

Operating System Path
Linux ~/.config/sourcery/sourcery.yaml
Mac ~/.config/sourcery/sourcery.yaml
Windows %APPDATA%\sourcery\sourcery.yaml