SwiftLint/Protocols/ConfigurationProviderRule.html

533 lines
27 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<title>ConfigurationProviderRule Protocol Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Protocol/ConfigurationProviderRule" class="dashAnchor"></a>
<a title="ConfigurationProviderRule Protocol Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
SwiftLintCore 0.52.2 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/realm/SwiftLint">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Frealm.github.io%2FSwiftLint%2Fdocsets%2FSwiftLintCore.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">SwiftLintCore Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
ConfigurationProviderRule Protocol Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Rules.html">Rules</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../rule-directory.html">Rule Directory</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Reporters.html">Reporters</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/CSVReporter.html">CSVReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/CheckstyleReporter.html">CheckstyleReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/CodeClimateReporter.html">CodeClimateReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/EmojiReporter.html">EmojiReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/GitHubActionsLoggingReporter.html">GitHubActionsLoggingReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/HTMLReporter.html">HTMLReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/JSONReporter.html">JSONReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/JUnitReporter.html">JUnitReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/MarkdownReporter.html">MarkdownReporter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/CustomRuleTimer.html">CustomRuleTimer</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/DeclaredIdentifiersTrackingVisitor.html">DeclaredIdentifiersTrackingVisitor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/LinterCache.html">LinterCache</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/RuleRegistry.html">RuleRegistry</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/RuleStorage.html">RuleStorage</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/SwiftLintFile.html">SwiftLintFile</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/ViolationsSyntaxVisitor.html">ViolationsSyntaxVisitor</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Global%20Variables.html">Global Variables</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Global%20Variables.html#/s:13SwiftLintCore9coreRulesSayAA4Rule_pXpGvp">coreRules</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Global%20Variables.html#/s:13SwiftLintCore13reportersListSayAA8Reporter_pXpGvp">reportersList</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/AccessControlLevel.html">AccessControlLevel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ExecutableInfo.html">ExecutableInfo</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Issue.html">Issue</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/RuleIdentifier.html">RuleIdentifier</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/RuleKind.html">RuleKind</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/RuleListError.html">RuleListError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/SwiftExpressionKind.html">SwiftExpressionKind</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/ViolationSeverity.html">ViolationSeverity</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:13SwiftLintCore12reporterFrom10identifierAA8Reporter_pXpSS_tF">reporterFrom(identifier:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ASTRule.html">ASTRule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/AnalyzerRule.html">AnalyzerRule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols.html#/s:13SwiftLintCore17AnyCollectingRuleP">AnyCollectingRule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/CacheDescriptionProvider.html">CacheDescriptionProvider</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/CollectingRule.html">CollectingRule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ConfigurationProviderRule.html">ConfigurationProviderRule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/CorrectableRule.html">CorrectableRule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols.html#/s:13SwiftLintCore9OptInRuleP">OptInRule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/Reporter.html">Reporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/Rule.html">Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/RuleConfiguration.html">RuleConfiguration</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SeverityBasedRuleConfiguration.html">SeverityBasedRuleConfiguration</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols.html#/s:13SwiftLintCore17SourceKitFreeRuleP">SourceKitFreeRule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SubstitutionCorrectableASTRule.html">SubstitutionCorrectableASTRule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SubstitutionCorrectableRule.html">SubstitutionCorrectableRule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SwiftSyntaxCorrectableRule.html">SwiftSyntaxCorrectableRule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SwiftSyntaxRule.html">SwiftSyntaxRule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ViolationsSyntaxRewriter.html">ViolationsSyntaxRewriter</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/ChildOptionSeverityConfiguration.html">ChildOptionSeverityConfiguration</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/CollectedLinter.html">CollectedLinter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Command.html">Command</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Command/Action.html"> Action</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Command/Modifier.html"> Modifier</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Configuration.html">Configuration</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Correction.html">Correction</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Example.html">Example</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/GitLabJUnitReporter.html">GitLabJUnitReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Linter.html">Linter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Location.html">Location</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/ReasonedRuleViolation.html">ReasonedRuleViolation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/RegexConfiguration.html">RegexConfiguration</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Region.html">Region</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/RelativePathReporter.html">RelativePathReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/RuleDescription.html">RuleDescription</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/RuleList.html">RuleList</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/RuleListDocumentation.html">RuleListDocumentation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/RuleParameter.html">RuleParameter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/SeverityConfiguration.html">SeverityConfiguration</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/SeverityLevelsConfiguration.html">SeverityLevelsConfiguration</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/SonarQubeReporter.html">SonarQubeReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Stack.html">Stack</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/StyleViolation.html">StyleViolation</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/SummaryReporter.html">SummaryReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/SwiftLintSyntaxMap.html">SwiftLintSyntaxMap</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/SwiftLintSyntaxToken.html">SwiftLintSyntaxToken</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/SwiftVersion.html">SwiftVersion</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Version.html">Version</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/XcodeReporter.html">XcodeReporter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlParser.html">YamlParser</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>ConfigurationProviderRule</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">ConfigurationProviderRule</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/Rule.html">Rule</a></span></code></pre>
</div>
</div>
<p>A rule that is user-configurable.</p>
<div class="slightly-smaller">
<a href="https://github.com/realm/SwiftLint/tree/main/Source/SwiftLintCore/Protocols/Rule.swift#L100-L106">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:13SwiftLintCore25ConfigurationProviderRuleP0D4TypeQa"></a>
<a name="//apple_ref/swift/Alias/ConfigurationType" class="dashAnchor"></a>
<a class="token" href="#/s:13SwiftLintCore25ConfigurationProviderRuleP0D4TypeQa">ConfigurationType</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The type of configuration used to configure this rule.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">associatedtype</span> <span class="kt">ConfigurationType</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/RuleConfiguration.html">RuleConfiguration</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/realm/SwiftLint/tree/main/Source/SwiftLintCore/Protocols/Rule.swift#L102">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:13SwiftLintCore25ConfigurationProviderRuleP13configuration0D4TypeQzvp"></a>
<a name="//apple_ref/swift/Property/configuration" class="dashAnchor"></a>
<a class="token" href="#/s:13SwiftLintCore25ConfigurationProviderRuleP13configuration0D4TypeQzvp">configuration</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This rule&rsquo;s configuration.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">configuration</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ConfigurationProviderRule.html#/s:13SwiftLintCore25ConfigurationProviderRuleP0D4TypeQa">ConfigurationType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/realm/SwiftLint/tree/main/Source/SwiftLintCore/Protocols/Rule.swift#L105">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:13SwiftLintCore4RuleP13configurationxyp_tKcfc"></a>
<a name="//apple_ref/swift/Method/init(configuration:)" class="dashAnchor"></a>
<a class="token" href="#/s:13SwiftLintCore4RuleP13configurationxyp_tKcfc">init(configuration:<wbr>)</a>
</code>
<span class="declaration-note">
Extension method
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="nf">init</span><span class="p">(</span><span class="nv">configuration</span><span class="p">:</span> <span class="kt">Any</span><span class="p">)</span> <span class="k">throws</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/realm/SwiftLint/tree/main/Source/SwiftLintCore/Protocols/CollectingRule.swift#L153-L156">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:13SwiftLintCore4RuleP9isEqualToySbAaB_pF"></a>
<a name="//apple_ref/swift/Method/isEqualTo(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:13SwiftLintCore4RuleP9isEqualToySbAaB_pF">isEqualTo(_:<wbr>)</a>
</code>
<span class="declaration-note">
Extension method
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">isEqualTo</span><span class="p">(</span><span class="n">_</span> <span class="nv">rule</span><span class="p">:</span> <span class="kt"><a href="../Protocols/Rule.html">Rule</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/realm/SwiftLint/tree/main/Source/SwiftLintCore/Protocols/CollectingRule.swift#L158-L163">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:13SwiftLintCore4RuleP24configurationDescriptionSSvp"></a>
<a name="//apple_ref/swift/Property/configurationDescription" class="dashAnchor"></a>
<a class="token" href="#/s:13SwiftLintCore4RuleP24configurationDescriptionSSvp">configurationDescription</a>
</code>
<span class="declaration-note">
Extension method
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">configurationDescription</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/realm/SwiftLint/tree/main/Source/SwiftLintCore/Protocols/CollectingRule.swift#L165-L167">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2023 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>