Class BowireLintConfigLoader

Namespace
Kuestenlogik.Bowire.Linting
Assembly
Kuestenlogik.Bowire.dll

Auto-discovery + loading for the .bowire/rules.json lint config (#189), mirroring BowireProjectLoader: DiscoverPath(string?) walks UP the directory tree from a start directory looking for .bowire/rules.json, so bowire lint run anywhere in a checkout picks up the workspace's rules without a flag. "Not found" is null, never an exception. Load(string) reads a specific file and hands it to Parse(string).

public static class BowireLintConfigLoader
Inheritance
BowireLintConfigLoader
Inherited Members

Fields

ConventionFileName

The convention filename inside .bowire/.

public const string ConventionFileName = "rules.json"

Field Value

string

Methods

DiscoverPath(string?)

Walk up from startDirectory (default: the current working directory) looking for .bowire/rules.json. Returns the first match toward the filesystem root, or null when none exists. Never throws for "not found".

public static string? DiscoverPath(string? startDirectory = null)

Parameters

startDirectory string

Returns

string

Load(string)

Read + parse the config at filePath. Propagates IO / JSON failures.

public static BowireLintConfig Load(string filePath)

Parameters

filePath string

Returns

BowireLintConfig