Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

new lang tag, chinese + russian lang generators #97

Merged
merged 7 commits into from Jun 2, 2020

Conversation

musinit
Copy link
Contributor

@musinit musinit commented May 26, 2020

I thought it would be nice to check string encoding, if you have possibility to generate strings in different languages.

fix #94

@bxcodec
Copy link
Owner

bxcodec commented May 27, 2020

Hi @musinit,
Thanks for the PR.

Would you mind do a linter checking first?
In your local, just run this commands

# Downloading the linter
$ make lint-prepare

# Apply the linter
$ make lint

@musinit
Copy link
Contributor Author

musinit commented May 27, 2020

Sure!

@codecov
Copy link

codecov bot commented May 27, 2020

Codecov Report

Merging #97 into master will increase coverage by 0.11%.
The diff coverage is 91.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #97      +/-   ##
==========================================
+ Coverage   94.92%   95.04%   +0.11%     
==========================================
  Files          10       10              
  Lines         966      989      +23     
==========================================
+ Hits          917      940      +23     
  Misses         27       27              
  Partials       22       22              
Impacted Files Coverage Δ
faker.go 90.86% <91.11%> (+0.49%) ⬆️
internet.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab0e82b...6e6e864. Read the comment docs.

@musinit
Copy link
Contributor Author

musinit commented May 27, 2020

@bxcodec how is this PR for you? If all in all it's ok as an idea and realisation, I will cover it with more tests to pass all checks.

@bxcodec
Copy link
Owner

bxcodec commented May 27, 2020

Overall looks good.
So basically, you just change the character, isn't it?

I'm not sure yet about the correctness, but yeah it's just a random word, same with the English character, we just put a random chars on it, so I'm good. Please add more coverage if possible 🙏

@musinit
Copy link
Contributor Author

musinit commented May 27, 2020

Yeh, sure!

@musinit
Copy link
Contributor Author

musinit commented May 27, 2020

Don't understand, what means codecov/patch — 91.83% of diff hit (target 94.92%)..hope someone will help me to understand what should I change (more test coverage?)

if err != nil {
return nil, fmt.Errorf(ErrWrongFormattedTag, tag)
}
strlen, _ = strconv.Atoi(lenParts[1])
Copy link
Owner

Choose a reason for hiding this comment

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

why ignore the error again?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in this concrete case lenParts[1] are always some digits, because of the regex len=\d+. But if you think that we should check error anyway, because, for example, someone can change this regex, or smth else can happen, I'll do it

@bxcodec
Copy link
Owner

bxcodec commented May 28, 2020

Don't understand, what means codecov/patch — 91.83% of diff hit (target 94.92%)..hope someone will help me to understand what should I change (more test coverage?)

It's okay, I think it affected by previous code.
The coverage for the whole project is already surpass the previous one, so it's okay

@bxcodec bxcodec merged commit 9169c33 into bxcodec:master Jun 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support different languages
2 participants