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

Adding reverseOrg string formatter #547

Merged
merged 3 commits into from
May 9, 2021
Merged

Adding reverseOrg string formatter #547

merged 3 commits into from
May 9, 2021

Conversation

TonioGela
Copy link
Member

I added a string formatter with an unhappy name (naming is not my best skill) that tokenizes a string using the '.' character and reverses the order of the tokens.
The use case I had in mind is the organization vs organizationName keys that a lot of times (at least for me) are simply derivable one from the other, eg. organizationName := "github.com" and organization := "com.github"
I added a property based test and updated the english documentation.

@TonioGela
Copy link
Member Author

TonioGela commented Apr 30, 2021

I add that if the general idea of this string formatter is approved it makes sense to me to compose it with other formatters like the lowercasing one in order to be able to perform transformations like Github.com to com.github

docs/03/a.md Outdated Show resolved Hide resolved
@TonioGela
Copy link
Member Author

Updated according to comments

Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TonioGela
Copy link
Member Author

It seems that the failure is due to a flaky property test

[info] ! Format.formatLowercase: Falsified after 0 passed tests.
[info] > ARG_0: ""
[info] > ARG_1: ""
[info] > ARG_2: ""
[info] > ARG_0_ORIGINAL: "i"
[Info] > ARG_1_ORIGINAL: "K"
[info] > ARG_2_ORIGINAL: "³"

that doesn't seem to be related to this PR.
I'll take a look at it in a separate issue.

@eed3si9n eed3si9n merged commit 3c90ebe into foundweekends:master May 9, 2021
@eed3si9n
Copy link
Member

eed3si9n commented May 9, 2021

Yea. I reran the test and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants