Skip to content

Commit

Permalink
Merge pull request #2158 from barton2526/misc
Browse files Browse the repository at this point in the history
test: Drop Travis specific workarounds, Mention commit id in error, Fix typos, Update spellcheck ignore words
  • Loading branch information
jamescowens authored Jun 4, 2021
2 parents fc18f5f + 603b679 commit be5c657
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- Fix lingering peers.dat temp files and clean up remaining paths #1582 (@cyrossignol)
- Fix incorrect beacon length warning in GUI transaction list #1585 (@cyrossignol)
- Fix default config file line endings on Windows #1587 (@cyrossignol)
- Reenable Travis builds for MacOS #1591 (@jamescowens)
- Re-enable Travis builds for MacOS #1591 (@jamescowens)
- Correct peer detail info background color #1593 (@jamescowens)
- Fix exception in debug3 mode #1598 (@cyrossignol)
- Fix deadlock in "getmininginfo" RPC function #1596 (@cyrossignol)
Expand Down
10 changes: 5 additions & 5 deletions src/gridcoin/backup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ bool GRC::MaintainBackups(fs::path wallet_backup_path, std::vector<std::string>
{
std::string filename = iter.path().filename().string();

int64_t imbedded_file_time = 0;
int64_t embedded_file_time = 0;

size_t found_pos = filename.find("-");

Expand All @@ -276,10 +276,10 @@ bool GRC::MaintainBackups(fs::path wallet_backup_path, std::vector<std::string>
{
std::string datetime = filename.substr(found_pos + 1, filename.size() - (found_pos + 1));

imbedded_file_time = ParseISO8601DateTime(datetime);
embedded_file_time = ParseISO8601DateTime(datetime);

// If ParseISO8601DateTime can't parse the imbedded datetime string, it will return 0.
if (!imbedded_file_time)
// If ParseISO8601DateTime can't parse the embedded datetime string, it will return 0.
if (!embedded_file_time)
{
LogPrintf("WARN: MaintainBackups: Unable to parse date-time in backup filename."
"Ignoring time retention for this file.");
Expand All @@ -294,7 +294,7 @@ bool GRC::MaintainBackups(fs::path wallet_backup_path, std::vector<std::string>

if (retention_by_days > 0)
{
if (i >= retention_by_num && (!imbedded_file_time || (imbedded_file_time < retention_cutoff_time)))
if (i >= retention_by_num && (!embedded_file_time || (embedded_file_time < retention_cutoff_time)))
{
remove_file = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/qt/coincontroldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ bool CoinControlDialog::filterInputsByValue(const bool& less, const CAmount& inp
++input_count;
}

// Reenable update signals.
// Re-enable update signals.
ui->treeWidget->setEnabled(true);

CoinControlDialog::updateLabels(model, coinControl, payAmounts, this);
Expand Down
2 changes: 1 addition & 1 deletion src/qt/consolidateunspentwizardselectinputspage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ bool ConsolidateUnspentWizardSelectInputsPage::filterInputsByValue(const bool& l
++input_count;
}

// Reenable update signals.
// Re-enable update signals.
ui->treeWidget->setEnabled(true);

// If the number of inputs selected was limited, then true is returned.
Expand Down
2 changes: 1 addition & 1 deletion test/lint/commit-script-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ for commit in $(git rev-list --reverse $1); do
git reset --quiet --hard HEAD
else
if git rev-list "--format=%b" -n1 $commit | grep -q '^-\(BEGIN\|END\)[ a-zA-Z]*-$'; then
echo "Error: script block marker but no scripted-diff in title"
echo "Error: script block marker but no scripted-diff in title of commit $commit"
echo "Failed"
RET=1
fi
Expand Down
8 changes: 0 additions & 8 deletions test/lint/lint-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@

export LC_ALL=C

# The shellcheck binary segfault/coredumps in Travis with LC_ALL=C
# It does not do so in Ubuntu 14.04, 16.04, 18.04 in versions 0.3.3, 0.3.7, 0.4.6
# respectively. So export LC_ALL=C is set as required by lint-shell-locale.sh
# but unset here in case of running in Travis.
if [ "$TRAVIS" = "true" ]; then
unset LC_ALL
fi

# Disabled warnings:
disabled=(
SC2046 # Quote this to prevent word splitting.
Expand Down
3 changes: 3 additions & 0 deletions test/lint/lint-spelling.ignore-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ copyable
cachable
errorstring
keyserver
keypair
homogenous
setban
hist
Expand All @@ -19,3 +20,5 @@ unser
nnumber
fo
dout
nin
inout
14 changes: 7 additions & 7 deletions test/lint/lint-whitespace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,32 @@ while getopts "?" opt; do
case $opt in
?)
echo "Usage: $0 [N]"
echo " TRAVIS_COMMIT_RANGE='<commit range>' $0"
echo " COMMIT_RANGE='<commit range>' $0"
echo " $0 -?"
echo "Checks unstaged changes, the previous N commits, or a commit range."
echo "TRAVIS_COMMIT_RANGE='47ba2c3...ee50c9e' $0"
echo "COMMIT_RANGE='47ba2c3...ee50c9e' $0"
exit 0
;;
esac
done

if [ -z "${TRAVIS_COMMIT_RANGE}" ]; then
if [ -z "${COMMIT_RANGE}" ]; then
if [ -n "$1" ]; then
TRAVIS_COMMIT_RANGE="HEAD~$1...HEAD"
COMMIT_RANGE="HEAD~$1...HEAD"
else
TRAVIS_COMMIT_RANGE="HEAD"
COMMIT_RANGE="HEAD"
fi
fi

showdiff() {
if ! git diff -U0 "${TRAVIS_COMMIT_RANGE}" -- "." ":(exclude)depends/patches/" ":(exclude)src/leveldb/" ":(exclude)src/crc32c/" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)doc/release-notes/" ":(exclude)src/qt/locale/"; then
if ! git diff -U0 "${COMMIT_RANGE}" -- "." ":(exclude)depends/patches/" ":(exclude)src/leveldb/" ":(exclude)src/crc32c/" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)doc/release-notes/" ":(exclude)src/qt/locale/"; then
echo "Failed to get a diff"
exit 1
fi
}

showcodediff() {
if ! git diff -U0 "${TRAVIS_COMMIT_RANGE}" -- *.cpp *.h *.md *.py *.sh ":(exclude)src/leveldb/" ":(exclude)src/crc32c/" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)doc/release-notes/" ":(exclude)src/qt/locale/"; then
if ! git diff -U0 "${COMMIT_RANGE}" -- *.cpp *.h *.md *.py *.sh ":(exclude)src/leveldb/" ":(exclude)src/crc32c/" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)doc/release-notes/" ":(exclude)src/qt/locale/"; then
echo "Failed to get a diff"
exit 1
fi
Expand Down

0 comments on commit be5c657

Please sign in to comment.