-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
tool_writeout: refactor write-out and write-out json #6544
Conversation
This pull request introduces 1 alert when merging 0969181 into 36ef648 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging dd887a0 into 36ef648 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 8689080 into 36ef648 - view on LGTM.com new alerts:
|
30105e7
to
77b164f
Compare
Congratulations 🎉. DeepCode analyzed your code in 8.949 seconds and we found no issues. Enjoy a moment of no bugs ☀️. 👉 View analysis in DeepCode’s Dashboard | Configure the bot |
This pull request introduces 1 alert when merging 77b164f into 796ce29 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 1948ecf into 796ce29 - view on LGTM.com new alerts:
|
LGTM says
Some compilers warned about an earlier iteration of this, |
7e44a9c
to
886e601
Compare
- Deduplicate the logic used by write-out and write-out json. Rather than have separate writeLong, writeString, etc, logic for each of write-out and write-out json instead have respective shared functions that can output either format and a 'use_json' parameter to indicate whether it is json that is output. This will make it easier to maintain. Rather than have to go through two sets of logic now we only have to go through one. - Support write-out %{errormsg} and %{exitcode} in json. - Clarify in the doc that %{exitcode} is the exit code of the transfer. Prior to this change it just said "The numerical exitcode" which implies it's the exit code of the tool, and it's not necessarily that. Closes #xxxx
20a42dd
to
16746a3
Compare
Rather than have separate writeLong, writeString, etc, logic for
each of write-out and write-out json instead have respective shared
functions that can output either format and a 'use_json' parameter to
indicate whether it is json that is output.
This will make it easier to maintain. Rather than have to go through
two sets of logic now we only have to go through one.
Support write-out %{errormsg} and %{exitcode} in json.
Clarify in the doc that %{exitcode} is the exit code of the transfer.
Prior to this change it just said "The numerical exitcode" which
implies it's the exit code of the tool, and it's not necessarily that.
Closes #xxxx
Note for json this explicitly returns null for keys when the data is not available, which prior to this change was only done for the filename_effective key. That means errormsg would be null if there was no error. Example: