Fix aviation empty entry and formatting.#762
Conversation
kingthorin
left a comment
There was a problem hiding this comment.
Should we be using/mandating quotes more specifically?
Is there something we should be adding to tests here? (Not specific to aviation, but in general)
With what purpose?
Maybe. I think it would be good to make sure a result can never be an empty string or so? (I assume that would have been the result of this?) |
|
|
Regarding 1, I had the same. I went through a few yml files to check them, but it's very inconsistent, but changing this might be a bit of an effort. Regarding 2: thanks! |
|
Looks like we could make it consistent leveraging spotless https://github.com/diffplug/spotless/tree/main/plugin-maven#yaml We already use spotless so shall I look into doing that? |
|
@bodiam do you recall a particular part of the file that wasn't working prior to this? I guess I could roll this back on my local copy and see how it fails but if it's intermittent then that's kind of a pain. |
|
@kingthorin just remove some items and create a list with empty elements in YAML, that should do it |
|
So with the abstracted tests we do already test that the value is not empty and is within the set. But there's not currently a way to test the full set. Is there a simple way to return all (or n) unique values for a given faker? (Ex: All aircraft, or all first names .... I understand for ID numbers etc a full list might not be good hence "or n"). Then I could add tests that ensure that doesn't contain any empty entries? Or, should we tackle this a different way and go lower and simply disallow/skip "reading" empty strings from the yaml? |
|
Do we not have [INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.833 s
[INFO] Finished at: 2023-04-15T18:43:10-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.35.0:check (default-cli) on project datafaker: Unable to format file C:\pathtoworkspace\datafaker\src\main\java\net\datafaker\idnumbers\NricNumber.java: java.lang.reflect.InvocationTargetException: 19:10: error: illegal start of expression -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
|
No description provided.