Deduplicate emitted error messages
Problem
The tool emits error message twice.
Proposed solution
Show the error message only once.
Examples
Example https://gitlab.com/gitlab-org/status-page/-/jobs/1002299879
$ untamper-my-lockfile --lockfile yarn.lock
Checking whether lockfile(s) yarn.lock have been tampered with
Checking yarn.lock: package 1979 of 1979
[X] Found problems with the lockfile(s):
- ERROR yarn.lock: @babel/code-frame@7.8.0: Lockfile has '@babel/highlight@^7.8.3' in 'dependencies' while not listed at the registry.
- ERROR yarn.lock: @babel/code-frame@7.8.0: Lockfile is missing '@babel/highlight@^7.8.0' in 'dependencies'.
- ERROR yarn.lock: @babel/code-frame@7.8.0: integrity hash is sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==, expected sha512-AN2IR/wCUYsM+PdErq6Bp3RFTXl8W0p9Nmymm7zkpsCmh+r/YYcckaCGpU8Q/mEKmST19kkGRaG42A/jxOWwBA==
- ERROR yarn.lock: @babel/code-frame@7.8.0: resolved URL is https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e, expected https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.0.tgz#8c98d4ac29d6f80f28127b1bc50970a72086c5ac
- ERROR yarn.lock: @babel/code-frame@7.8.0: Lockfile has '@babel/highlight@^7.8.3' in 'dependencies' while not listed at the registry.
- ERROR yarn.lock: @babel/code-frame@7.8.0: Lockfile is missing '@babel/highlight@^7.8.0' in 'dependencies'.
- ERROR yarn.lock: @babel/code-frame@7.8.0: integrity hash is sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==, expected sha512-AN2IR/wCUYsM+PdErq6Bp3RFTXl8W0p9Nmymm7zkpsCmh+r/YYcckaCGpU8Q/mEKmST19kkGRaG42A/jxOWwBA==
- ERROR yarn.lock: @babel/code-frame@7.8.0: resolved URL is https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e, expected https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.0.tgz#8c98d4ac29d6f80f28127b1bc50970a72086c5ac
Example https://gitlab.com/gitlab-org/status-page/-/jobs/1002278923
$ untamper-my-lockfile --lockfile yarn.lock
Checking whether lockfile(s) yarn.lock have been tampered with
Checking yarn.lock: package 1979 of 1979
[X] Found problems with the lockfile(s):
- ERROR yarn.lock: @babel/code-frame@7.8.2: version '7.8.2' doesn't exist in registry
- ERROR yarn.lock: @babel/code-frame@7.8.2: version '7.8.2' doesn't exist in registry
Example https://gitlab.com/gitlab-org/status-page/-/jobs/1002269870
$ untamper-my-lockfile --lockfile yarn.lock
Checking whether lockfile(s) yarn.lock have been tampered with
Checking yarn.lock: package 1979 of 1979
[X] Found problems with the lockfile(s):
- ERROR yarn.lock: @babel/code-frame@7.8.3: resolved URL is https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.2.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e, expected https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e
- ERROR yarn.lock: @babel/code-frame@7.8.3: resolved URL is https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.2.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e, expected https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e
Edited by Peter Leitzen