Skip to content

Commit

Permalink
Fix some remaining StyleCop rules violations
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe committed Dec 17, 2018
1 parent 9ad0240 commit c6a455b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
8 changes: 8 additions & 0 deletions src/Stripe.net/Enums/Billing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ namespace Stripe
[JsonConverter(typeof(StringEnumConverter))]
public enum Billing
{
/// <summary>
/// When charging automatically, Stripe will attempt to pay this invoice or subscription
/// using the default source attached to the customer.
/// </summary>
[EnumMember(Value = "charge_automatically")]
ChargeAutomatically,

/// <summary>
/// When sending an invoice, Stripe will email your customer an invoice with payment
/// instructions.
/// </summary>
[EnumMember(Value = "send_invoice")]
SendInvoice,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,15 @@ private static string NewPrefix(string key, string keyPrefix)
/// </summary>
internal sealed class Parameter
{
public readonly string Key;
public readonly string Value;

public Parameter(string key, string value)
{
this.Key = key;
this.Value = value;
}

public string Key { get; }

public string Value { get; }
}
}
}
1 change: 1 addition & 0 deletions src/Stripe.net/Stripe.net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/StripeTests/StripeTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<AssemblyName>StripeTests</AssemblyName>
<PackageId>StripeTests</PackageId>
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 0 additions & 8 deletions src/_stylecop/StyleCopRules.ruleset
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Rules for StyleCop.Analyzers" Description="Code analysis rules for Stripe.net" ToolsVersion="14.0">
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<!--
SA1401: FieldsMustBePrivate
This ones would introduce breaking changes
-->
<Rule Id="SA1401" Action="None" />

<!--
Keep this rule disabled as it would force a header for each file
and a copyright.
Expand All @@ -33,8 +27,6 @@
-->
<Rule Id="CS1591" Action="None" />
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1601" Action="None" />
<Rule Id="SA1602" Action="None" />
<Rule Id="SA1623" Action="None" />
</Rules>
</RuleSet>

0 comments on commit c6a455b

Please sign in to comment.