# YamlLintOptions

The rules YamlLinter checks and how.

Class 

`OfficeIMO.Yaml`

**Namespace**

`OfficeIMO.Yaml`

**Assembly**

`OfficeIMO.Yaml`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[YamlLintOptions.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L19)

**Modifiers**

sealed

The rules [YamlLinter](/api/yaml/officeimo-yaml-yamllinter/) checks and how. The defaults report what is likely a mistake or reads differently in other tools, and leave matters of taste (document markers, empty values, quoting, key order) off.

## Inheritance

- object
- YamlLintOptions

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Accepted by parameters 2

- Method [YamlLinter.Fix](/api/yaml/officeimo-yaml-yamllinter/#method-fix-string-officeimo-yaml-yamllintoptions) parameter `options`
- Method [YamlLinter.Lint](/api/yaml/officeimo-yaml-yamllinter/#method-lint-string-officeimo-yaml-yamllintoptions) parameter `options`

Filter members 

Show inherited

## Constructors

`public YamlLintOptions()` [#](#constructor-ctor)

[YamlLintOptions.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L19)

Creates options with every rule at its default.

## Methods

`public YamlLintRuleOptions? GetRule(string ruleId)` [#](#method-getrule-string)

[YamlLintOptions.cs:71](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L71)

Returns the rule with an id from [YamlLintRules](/api/yaml/officeimo-yaml-yamllintrules/), or null for an unknown id.

Parameters

**ruleId string required**

Returns

`YamlLintRuleOptions?`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public YamlLintIndentationOptions Indentation { get; }` [#](#property-indentation)

[YamlLintOptions.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L19)

Gets the [YamlLintRules.Indentation](/api/yaml/officeimo-yaml-yamllintrules/) rule. On by default.

`public YamlLintRuleOptions TrailingSpaces { get; }` [#](#property-trailingspaces)

[YamlLintOptions.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L22)

Gets the [YamlLintRules.TrailingSpaces](/api/yaml/officeimo-yaml-yamllintrules/) rule. On by default.

`public YamlLintLineLengthOptions LineLength { get; }` [#](#property-linelength)

[YamlLintOptions.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L25)

Gets the [YamlLintRules.LineLength](/api/yaml/officeimo-yaml-yamllintrules/) rule. On by default, at 120 characters.

`public YamlLintTruthyOptions Truthy { get; }` [#](#property-truthy)

[YamlLintOptions.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L28)

Gets the [YamlLintRules.Truthy](/api/yaml/officeimo-yaml-yamllintrules/) rule. On by default.

`public YamlLintRuleOptions KeyDuplicates { get; }` [#](#property-keyduplicates)

[YamlLintOptions.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L31)

Gets the [YamlLintRules.KeyDuplicates](/api/yaml/officeimo-yaml-yamllintrules/) rule. On by default, as an error.

`public YamlLintDocumentStartOptions DocumentStart { get; }` [#](#property-documentstart)

[YamlLintOptions.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L34)

Gets the [YamlLintRules.DocumentStart](/api/yaml/officeimo-yaml-yamllintrules/) rule. Off by default.

`public YamlLintEmptyValuesOptions EmptyValues { get; }` [#](#property-emptyvalues)

[YamlLintOptions.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L37)

Gets the [YamlLintRules.EmptyValues](/api/yaml/officeimo-yaml-yamllintrules/) rule. Off by default.

`public YamlLintCommentsOptions Comments { get; }` [#](#property-comments)

[YamlLintOptions.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L40)

Gets the [YamlLintRules.Comments](/api/yaml/officeimo-yaml-yamllintrules/) rule. On by default.

`public YamlLintOctalValuesOptions OctalValues { get; }` [#](#property-octalvalues)

[YamlLintOptions.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L43)

Gets the [YamlLintRules.OctalValues](/api/yaml/officeimo-yaml-yamllintrules/) rule. On by default, for implicit octals only.

`public YamlLintRuleOptions Tabs { get; }` [#](#property-tabs)

[YamlLintOptions.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L46)

Gets the [YamlLintRules.Tabs](/api/yaml/officeimo-yaml-yamllintrules/) rule. On by default.

`public YamlLintRuleOptions NewLineAtEndOfFile { get; }` [#](#property-newlineatendoffile)

[YamlLintOptions.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L49)

Gets the [YamlLintRules.NewLineAtEndOfFile](/api/yaml/officeimo-yaml-yamllintrules/) rule. On by default.

`public YamlLintEmptyLinesOptions EmptyLines { get; }` [#](#property-emptylines)

[YamlLintOptions.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L52)

Gets the [YamlLintRules.EmptyLines](/api/yaml/officeimo-yaml-yamllintrules/) rule. On by default.

`public YamlLintQuotedStringsOptions QuotedStrings { get; }` [#](#property-quotedstrings)

[YamlLintOptions.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L55)

Gets the [YamlLintRules.QuotedStrings](/api/yaml/officeimo-yaml-yamllintrules/) rule. Off by default.

`public YamlLintRuleOptions KeyOrdering { get; }` [#](#property-keyordering)

[YamlLintOptions.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L58)

Gets the [YamlLintRules.KeyOrdering](/api/yaml/officeimo-yaml-yamllintrules/) rule. Off by default.

`public IReadOnlyList<YamlLintRuleOptions> Rules { get; }` [#](#property-rules)

[YamlLintOptions.cs:61](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L61)

Gets every configurable rule, in the order findings of one line are reported.

`public YamlLoadOptions? LoadOptions { get; set; }` [#](#property-loadoptions)

[YamlLintOptions.cs:67](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L67)

Gets or sets how the text is loaded, or null (the default) for a lenient load that admits duplicate keys so [YamlLintRules.KeyDuplicates](/api/yaml/officeimo-yaml-yamllintrules/) can report them.

<!-- PowerForge markdown artifact sha256:0C89957ED685B82B940DA46BD6ED257A8B5A775960CE2E9B1E98388374FB1D59 -->
