Skip to content

Commit

Permalink
Merge pull request #943 from Humanizr/fix-warnings
Browse files Browse the repository at this point in the history
Fix warnings
  • Loading branch information
clairernovotny committed Jun 2, 2020
2 parents 6a06840 + b9ab6e0 commit 2e0920b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 21 deletions.
8 changes: 0 additions & 8 deletions NuGet.config

This file was deleted.

10 changes: 1 addition & 9 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
<!-- Workaround. Remove once we're on 3.1.300+
https://github.com/dotnet/sourcelink/issues/572 -->
<Project>
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
</ItemGroup>


<Target Name="CoverletGetPathMap"
DependsOnTargets="InitializeSourceRootMappedPaths"
Returns="@(_LocalTopLevelSourceRoot)"
Expand Down
1 change: 0 additions & 1 deletion src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<LangVersion>latest</LangVersion>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Humanizer/HeadingExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static class HeadingExtensions
/// This representation has a maximum deviation of 11.25 degrees.
/// </summary>
/// <returns>A textual representation of the heading</returns>
/// <param name="heading">The heading value</param>
/// <param name="culture">The culture to return the textual representation in</param>
/// <param name="style">Whether to return a short result or not. <see cref="HeadingStyle"/></param>
public static string ToHeading(this double heading, HeadingStyle style = HeadingStyle.Abbreviated, CultureInfo culture = null)
Expand Down
2 changes: 0 additions & 2 deletions src/Humanizer/InflectorExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public static string Titleize(this string input)
/// By default, pascalize converts strings to UpperCamelCase also removing underscores
/// </summary>
/// <param name="input"></param>
/// <param name="removeWhiteSpace">"This has a space" -> "ThisHasASpace" if true</param>
/// <returns></returns>
public static string Pascalize(this string input)
{
Expand All @@ -79,7 +78,6 @@ public static string Pascalize(this string input)
/// Same as Pascalize except that the first character is lower case
/// </summary>
/// <param name="input"></param>
/// <param name="removeWhiteSpace">"This has a space" -> "thisHasASpace" if true</param>
/// <returns></returns>
public static string Camelize(this string input)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Humanizer/TimeSpanHumanizeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static class TimeSpanHumanizeExtensions
/// <param name="maxUnit">The maximum unit of time to output. The default value is <see cref="TimeUnit.Week"/>. The time units <see cref="TimeUnit.Month"/> and <see cref="TimeUnit.Year"/> will give approximations for time spans bigger 30 days by calculating with 365.2425 days a year and 30.4369 days a month.</param>
/// <param name="minUnit">The minimum unit of time to output.</param>
/// <param name="collectionSeparator">The separator to use when combining humanized time parts. If null, the default collection formatter for the current culture is used.</param>
/// <param name="toWords">Uses words instead of numbers if true. E.g. one day.</param>
/// <returns></returns>
public static string Humanize(this TimeSpan timeSpan, int precision = 1, CultureInfo culture = null, TimeUnit maxUnit = TimeUnit.Week, TimeUnit minUnit = TimeUnit.Millisecond, string collectionSeparator = ", ", bool toWords = false)
{
Expand All @@ -42,6 +43,7 @@ public static string Humanize(this TimeSpan timeSpan, int precision = 1, Culture
/// <param name="maxUnit">The maximum unit of time to output. The default value is <see cref="TimeUnit.Week"/>. The time units <see cref="TimeUnit.Month"/> and <see cref="TimeUnit.Year"/> will give approximations for time spans bigger than 30 days by calculating with 365.2425 days a year and 30.4369 days a month.</param>
/// <param name="minUnit">The minimum unit of time to output.</param>
/// <param name="collectionSeparator">The separator to use when combining humanized time parts. If null, the default collection formatter for the current culture is used.</param>
/// <param name="toWords">Uses words instead of numbers if true. E.g. one day.</param>
/// <returns></returns>
public static string Humanize(this TimeSpan timeSpan, int precision, bool countEmptyUnits, CultureInfo culture = null, TimeUnit maxUnit = TimeUnit.Week, TimeUnit minUnit = TimeUnit.Millisecond, string collectionSeparator = ", ", bool toWords = false)
{
Expand Down
11 changes: 10 additions & 1 deletion src/Humanizer/ToQuantityExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,16 @@ public static string ToQuantity(this string input, double quantity, string forma
return string.Format(formatProvider, "{0} {1}", quantity.ToString(format, formatProvider), transformedInput);

}


/// <summary>
/// Prefixes the provided word with the number and accordingly pluralizes or singularizes the word
/// </summary>
/// <param name="input">The word to be prefixed</param>
/// <param name="quantity">The quantity of the word</param>
/// <example>
/// "request".ToQuantity(0.2) => "0.2 requests"
/// </example>
/// <returns></returns>
public static string ToQuantity(this string input, double quantity)
{
return ToQuantity(input, quantity, null, null);
Expand Down

0 comments on commit 2e0920b

Please sign in to comment.