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

#787 More error messages improvements #833

Merged
merged 8 commits into from Jun 3, 2020

Conversation

piotradamczyk5
Copy link
Contributor

@piotradamczyk5 piotradamczyk5 commented Jun 2, 2020

Fixes #787

Test Plan

How do we know the code works?

Check error messages when YAML tree is bad (example in file flank-bad-yaml-formatting.yml)
Unit tests describe current behavior

Checklist

  • Unit tested
  • release_notes.md updated

@piotradamczyk5 piotradamczyk5 self-assigned this Jun 2, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jun 2, 2020

Codecov Report

Merging #833 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #833      +/-   ##
============================================
- Coverage     80.14%   80.11%   -0.03%     
- Complexity      674      676       +2     
============================================
  Files           151      151              
  Lines          3087     3098      +11     
  Branches        443      443              
============================================
+ Hits           2474     2482       +8     
- Misses          336      337       +1     
- Partials        277      279       +2     

@@ -13,3 +14,8 @@ fun convertConfigurationErrorExceptions(missingParameterError: Exception, yaml:
missingParameterError
}
}

fun convertConfigurationErrorExceptions(treeParsingException: MarkedYAMLException): Throwable {
val errorMessageBuilder = ConfigurationErrorMessageBuilder
Copy link
Contributor

Choose a reason for hiding this comment

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

If ConfigurationErrorMessageBuilder.invoke will be a top level function, this assignment wouldn't be needed ;).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to make this consistent I leave this in ConfigurationErrorMessageBuilder, but changed to a single line and avoid assignment

@@ -0,0 +1,214 @@
# gcloud args match the official gcloud cli
# See the docs for full gcloud details https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run
Copy link
Contributor

Choose a reason for hiding this comment

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

the comments are not necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

comments removed

@@ -78,6 +83,34 @@ Error node: {
Assert.assertEquals(exceptedMessage, actualMessage)
}

@Test
fun `Should properly build error message from MarkedYAMLException`() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Rest of function names starts from lower letter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@piotradamczyk5 piotradamczyk5 merged commit ddb115f into master Jun 3, 2020
@piotradamczyk5 piotradamczyk5 deleted the #787-more-error-messages-improvements branch June 3, 2020 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

More improvments in error messages
4 participants