extract the reporter out of integrity checker - #3248
Merged
bestander merged 8 commits intoApr 26, 2017
Merged
Conversation
…fore if one pattern is missing and we never reach that code
voxsim
force-pushed
the
extract-reporter-from-integrity-checker
branch
from
April 25, 2017 18:13
a2d83ff to
59f0aee
Compare
Contributor
Author
|
I think I am finished, @bestander let me know if you like the pr and if I understand correctly what you mean :P |
Member
|
Thanks, Simon!
…On 25 April 2017 at 19:21, Simon Vocella ***@***.***> wrote:
I think I am finished, @bestander <https://github.com/bestander> let me
know if you like the pr and if I understand correctly what you mean :P
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3248 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACBdWOiEadg4gxH2ne7uBJtqkMfTS_F7ks5rzjmYgaJpZM4NGk95>
.
|
bestander
requested changes
Apr 26, 2017
| checkFiles: boolean, | ||
| locationFolder: string): Promise<string> { | ||
| if (!expected) { | ||
| return Promise.resolve('EXPECTED_IS_NOT_A_JSON'); |
Member
There was a problem hiding this comment.
nit: I think flow enums would be a better fit here
| if (!compareSortedArrays(actual.flags, expected.flags)) { | ||
| this.reporter.warn(this.reporter.lang('integrityFlagsDontMatch')); | ||
| return false; | ||
| return Promise.resolve('FLAGS_DONT_MATCH'); |
Member
There was a problem hiding this comment.
Should all these errors be a reject rather than resolve?
Contributor
Author
|
@bestander I am sorry I really didn't know that with babel and async/await you can return something and this is 'automagically' wrapped by Promise.resolve O.o thanks for let me work on this and learn something new. I am reading how flow works, I will push something soon ;) |
Contributor
Author
|
done :D |
Member
|
Nice work! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Integrity-checker should not have side effects and we should reporting warning only in the check command.
Todo list
Test plan
See above.