Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make UseSingularNouns rule work on PowerShell Core #1627

Merged
merged 46 commits into from
Apr 28, 2021

Conversation

bergmeister
Copy link
Collaborator

@bergmeister bergmeister commented Jan 23, 2021

PR Summary

Fixes #1626

This uses the open source Pluralize.NET NuGet package, which uses the MIT licence. The added payload is only 20KB once.
Also enhance existing code to not construct Pluralizationservice in foreach loop.

PR Checklist

@bergmeister bergmeister changed the title Make UseSingularNouns rule work for PowerShell Core versions Make UseSingularNouns rule work on PowerShell Core Jan 23, 2021
@bergmeister bergmeister marked this pull request as ready for review January 23, 2021 10:43
@SydneyhSmith
Copy link
Collaborator

Ah unfortunately, the fact that the package is unlicensed does block us from accepting it

@bergmeister
Copy link
Collaborator Author

bergmeister commented Feb 3, 2021

Ok, will contact the author if an MIT license or something similar can be added as it was probably not intentional by the author. Would the licence need to be on the NuGet package or just the source repo?
Alternatively, there is a similar NuGet package with MIT license but that is not preferred as the implementation is different to the one that I suggested, which is just a .Net Core port.
https://github.com/sarathkcm/Pluralize.NET

@bergmeister
Copy link
Collaborator Author

@SydneyhSmith I updated it to use the Pluralize.NET library instead, which has an MIT licence.

@SydneyhSmith
Copy link
Collaborator

Thanks @bergmeister that package looks good to us

Rules/UseSingularNouns.cs Outdated Show resolved Hide resolved
Rules/UseSingularNouns.cs Outdated Show resolved Hide resolved
Tests/Engine/GetScriptAnalyzerRule.tests.ps1 Outdated Show resolved Hide resolved
Rules/UseSingularNouns.cs Outdated Show resolved Hide resolved
@rjmholt rjmholt self-assigned this Apr 22, 2021
@rjmholt rjmholt merged commit 1eb5671 into PowerShell:master Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PSUseSingularNouns Rule doesn't work in PowerShell Core but does in PowerShell
4 participants