Before this PR, the linenumber infomaition is output if trailing-space
or tab code was found, but the output occurence is only per a file.
This PR separates the output timing of file name and line number.
As a result, users will find where they need to fix more easily.
Lint checks should not test these, they are historical documents,
and we don't want to encourage silly changes to them to satisfy
a checker.
Hopefully makes travis pass again on master.
Tree-SHA512: 37e6716c4fd5e8a4e579f9b84042e6b0ac224836b6c851cd1ca3f7d46611ffd3003bed0ae08dd0457f69d6eaa485a0d21c631e7ef16b14bdb0f2f78ea700332d
This adds a new CHECK_DOC check that looks for newly introduced trailing
whitespace. Existing trailing whitespace (of which there is plenty!)
will not trigger an error.
This is written in a generic way so that new lint-*.sh scripts can be
added to contrib/devtools/, as I'd like to contribute additional lint
checks in the future.
Rename the FS_ZIP214_ECC funding stream to FS_ZIP214_BP
See also https://github.com/zcash/zips/pull/412 .
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Improve reject reasons for unmet shielded requirements
These reject messages end up bubbling up to users via the RPC interface.
Distinguishing between the various failure cases will help users figure
out why their transaction is being rejected.
Closeszcash/zcash#3114.
Enabled ShellCheck rules:
SC1087
SC2001
SC2004
SC2005
SC2006
SC2016
SC2028
SC2048
SC2066 (note that IFS already contains only a line feed)
SC2116
SC2166
SC2181
SC2206
SC2207
SC2230
SC2236
Zcash: Only the changes that applied to the versions of the scripts we have.
Fix an error reporting bug in "Checksum missing or mismatched ..."
The sense of the test was accidentally inverted in my change to #4733. The message should be shown if any of the files exist but have an incorrect checksum. fixes#4813
No documentation needed.
Test plan: as for #4733, and also check that there are no false positive "Checksum missing or mismatched ..." warnings.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
The sense of the test was accidentally inverted in my change to #4733.
The message should be shown if any of the files exist but have an incorrect checksum.
We also now correctly handle the case where there are no package source files.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
These reject messages end up bubbling up to users via the RPC interface.
Distinguishing between the various failure cases will help users figure
out why their transaction is being rejected.
Uses operator* instead of std::optional::value because the latter was
introduced in macOS 10.14, and our current minimum is 10.12.
Closeszcash/zcash#3114.
depends download: fix a logging bug for multi-archive packages:
No documentation change needed.
The test plan appears below. Since this bug output should appear on all builds without a pre-existing source cache, then an easier test plan might be to verify the bug output is not present from an infrastructure build log that doesn't rely on cached sources.
# Bug Behavior
While initially fetching packages, I saw `sh: test:` error messages in the make output for only two packages. However, it appears all packages are correctly fetched.
See detailed output appendix for demonstration of the bug output and conditions compared to with this patch for the same conditions.
# Analysis
## Design Requirements
The intent of the `check_or_remove_sources` is to fetch sources if either existing archive hashes do not match or the archives aren't present.
Additionally, this should report hash mismatches and be quiet about missing files.
## Bug Source
The second design requirement goal has a bug for multi-archive packages which define `$(package)_extra_sources)` because `test -f $($(package)_all_sources)` passes more than one argument to `test -f` which is not supported. If sha256sum fails in any case for multi-archive packages, a `sh: test` error line is always printed.
Aside from this spurious output, this bug has no effect, I believe. Fortunately this bug does not bypass the hash check!
## Testing
I tested this patch manually by running the same three tests against the `v4.0.0` tag and then again repeating those same three steps with this patch. In all 6 cases I visually inspected the output.
1. Starting with a pre-downloaded source cash, run the `download` target.
2. Remove an archive from a multi-archive package, then rerun `download`.
3. Alter a hash to cause a hash mismatch condition, then rerun `download`.
I believe after each step both with and without this patch the resulting source cache should be identical (except for filesystem timestamps).
### Testing v4.0.0 without this patch
Notice in the second and third steps the same bug output:
```
/bin/sh: 1: test: rust-std-1.42.0-x86_64-apple-darwin.tar.gz: unexpected operator
```