← All docs

Configuration reference

Lint/fix behavior is configured via an optional YAML file named papyrus-lint.yaml (or papyrus-lint.yml), placed at the project root: next to the .achlist file you drop into the app, or, for a single .psc file dropped directly, wherever that file's project root resolves to — conventionally the directory above its Scripts/Source/ Source/Scripts pair (e.g. Data for Data/Scripts/Source/abc.psc), or the nearest ancestor directory that already has a config file; see Resolving a project in the CLI reference for the exact resolution order. Any key it omits falls back to its default. The full default configuration, with every key documented inline, is checked in at configuration/papyrus-lint.default.yaml — it's also what PapyrusLinterCLI init (or init --preset strict, the default) writes into a project with no config file yet.

Lint/fix behavior is configured via an optional YAML file named papyrus-lint.yaml (or papyrus-lint.yml), placed at the project root: next to the .achlist file you drop into the app, or, for a single .psc file dropped directly, wherever that file's project root resolves to — conventionally the directory above its Scripts/Source/ Source/Scripts pair (e.g. Data for Data/Scripts/Source/abc.psc), or the nearest ancestor directory that already has a config file; see Resolving a project in the CLI reference for the exact resolution order. Any key it omits falls back to its default. The full default configuration, with every key documented inline, is checked in at configuration/papyrus-lint.default.yaml — it's also what PapyrusLinterCLI init (or init --preset strict, the default) writes into a project with no config file yet.

A JSON Schema for the same file is checked in at schema/papyrus-lint.schema.json (JSON Schema Draft 2020-12), so editors that support YAML schema association can complete keys and flag typos. The published copy is served at https://papyrus-lint.idrinth.de/schema/papyrus-lint.schema.json.

Presets

PapyrusLinterCLI init --preset <name> picks a different built-in starting point instead: standard keeps every rule with a real correctness/ performance stake plus the cheap, auto-fixable formatting rules, and turns off purely naming/style and informational/advisory rules; careful keeps only medium/high importance rules and relaxes the cyclomatic complexity thresholds, for a quiet first pass over an unfamiliar or legacy codebase. See configuration/presets/ for each built-in preset's own annotated YAML.

Besides the three built-ins, --preset <name> also accepts the name of a user preset: place a <name>.yaml (or .yml) file in a presets directory next to the running executable (the CLI binary, or the desktop app's binary when it delegates to CLI mode) and it becomes selectable the same way, e.g. a presets/my-team.yaml next to the binary is picked with init --preset my-team. This is separate from the executable-adjacent base config described below: a user preset is a full baseline init starts from, while the base config always layers on top of whichever preset (built-in or user) is selected.

PapyrusLinterCLI preset add <name> <path-to-papyrus-lint.yaml> adds a user preset the same way, without placing the file under the presets directory by hand: it copies the config at the given path into that directory as <name>.yaml, creating the directory first if it doesn't exist yet. <name> can't be blank or match a built-in preset name (strict, standard, careful), since a preset by one of those names could never actually be selected. If a preset named <name> already exists, it's left untouched and an error is reported unless --yes is also given — the confirmation an overwrite requires, since the CLI has no interactive prompt.

Desktop app configuration management

The desktop app's Settings tab has a "Configuration file" field for overriding this auto-detection: enter the path to a specific papyrus-lint.yaml/.yml file (it need not be named that, or live at the project root) and the app reads/writes lint settings there instead, regardless of which project directory is currently loaded — useful for switching between several saved configurations, or for a project whose config file doesn't live where auto-detection expects it. Leave it blank to go back to auto-detection. Whatever path is entered is remembered across app restarts, so it's prefilled the next time the app opens.

The desktop app offers the same presets — the three built-ins plus any user preset found under the executable-adjacent presets directory — as its own first-run picker: the first time it opens a project directory with no papyrus-lint.yaml/.yml of its own yet (and no "Configuration file" override set), it asks which preset to start from instead of silently linting against the engine's defaults. Every setting a preset picks can still be changed afterward in the Settings tab. Closing the dialog without choosing one leaves the project on the engine's built-in defaults without writing a config file, so it's asked again next time that directory is opened.

A "Save current settings as preset…" button at the bottom of the Settings tab goes the other way: it saves whatever the tab is currently set to as a new user preset, in the same executable-adjacent presets directory, so it becomes selectable from that first-run picker (or the CLI's --preset <name>) immediately afterward. It asks for a name and, if a preset already exists under it (a built-in name is rejected outright, since --preset always resolves those first), asks to overwrite it before replacing it.

A "Presets" tab appears next to Settings once at least one user preset exists (built-in presets can't be edited, so the tab stays hidden without one), listing each with Rename, Export, and Delete buttons: Rename asks for a new name with the same overwrite confirmation as saving one; Export downloads its papyrus-lint.yaml content as-is; Delete asks to confirm and removes it from the presets directory.

The app's formatting controls (trailing semicolons, indentation style, indentation width) are backed by this file: on startup it reads the config file for the most recently opened project and pre-selects those controls accordingly, and any change made to them is written straight back to the file, so the project's formatting settings persist between sessions and can be shared/committed alongside the project. The PapyrusCompiler.exe path field on the Settings tab works the same way, except it's pre-filled with an auto-detected path (see compiler_path below) rather than a fixed default when the project has no explicit override saved yet. The additional script roots textarea (see additional_script_roots below) and the lookup script roots textarea (see lookup_script_roots below) work the same way too, one directory per line.

Each key

View raw source on GitHub →