Merge #6053: trivial: add a missing dash-specific files in util/ to linter lists

fbffe06dad fix: suppress lint warnings for edge due to both missing epoll and kpoll (Konstantin Akimov)
b799683d60 fix: pass reference instead copy of argument in util/edge (Konstantin Akimov)
9d941aacb9 fix: removed unused assigned (Konstantin Akimov)
d9e2e47685 fix: add a missing file util/wpipe to linter lists (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Some source files in src/util is missing to specify as dash specific for linters

  ## What was done?
  Added to list of dash's linters

  ## How Has This Been Tested?
  Run `test/lint/lint-all.sh`

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  UdjinM6:
    utACK fbffe06dad
  PastaPastaPasta:
    utACK fbffe06dad
  kwvg:
    utACK fbffe06dad

Tree-SHA512: 05bd40f987a93b47ca939f37d6e5b62e2044f2acce7a6ea6c361594eace808da17b17e0149095daecd0fb5418c6cbedbc70ad07ac3b7a1156a94188b04c2fd00
This commit is contained in:
pasta 2024-06-15 12:04:36 -05:00
commit 77a025fb3b
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984
5 changed files with 12 additions and 6 deletions

View File

@ -62,7 +62,7 @@ EdgeTriggeredEvents::~EdgeTriggeredEvents()
} }
} }
bool EdgeTriggeredEvents::RegisterEntity(int entity, std::string entity_name) const bool EdgeTriggeredEvents::RegisterEntity(int entity, const std::string& entity_name) const
{ {
assert(m_valid); assert(m_valid);
@ -97,7 +97,7 @@ bool EdgeTriggeredEvents::RegisterEntity(int entity, std::string entity_name) co
return true; return true;
} }
bool EdgeTriggeredEvents::UnregisterEntity(int entity, std::string entity_name) const bool EdgeTriggeredEvents::UnregisterEntity(int entity, const std::string& entity_name) const
{ {
assert(m_valid); assert(m_valid);

View File

@ -44,8 +44,8 @@ private:
bool UnregisterPipe(int wakeup_pipe); bool UnregisterPipe(int wakeup_pipe);
private: private:
bool RegisterEntity(int entity, std::string entity_name) const; bool RegisterEntity(int entity, const std::string& entity_name) const;
bool UnregisterEntity(int entity, std::string entity_name) const; bool UnregisterEntity(int entity, const std::string& entity_name) const;
private: private:
/* Flag set if pipe has been registered with instance */ /* Flag set if pipe has been registered with instance */

View File

@ -37,7 +37,7 @@ bool CRangesSet::Add(uint64_t value)
if (next != ranges.end()) { if (next != ranges.end()) {
if (next->begin == value + 1) { if (next->begin == value + 1) {
new_range.end = next->end; new_range.end = next->end;
it = ranges.erase(next); ranges.erase(next);
} }
} }
const auto ret = ranges.insert(new_range); const auto ret = ranges.insert(new_range);

View File

@ -85,7 +85,7 @@ then
mkdir $CPPCHECK_DIR mkdir $CPPCHECK_DIR
fi fi
WARNINGS=$(echo "${FILES}" | \ WARNINGS=$(echo "${FILES}" | \
xargs cppcheck --enable=all --inline-suppr --suppress=missingIncludeSystem --cppcheck-build-dir=$CPPCHECK_DIR -j "$(getconf _NPROCESSORS_ONLN)" --language=c++ --std=c++17 --template=gcc -D__cplusplus -DENABLE_WALLET -DCLIENT_VERSION_BUILD -DCLIENT_VERSION_IS_RELEASE -DCLIENT_VERSION_MAJOR -DCLIENT_VERSION_MINOR -DCOPYRIGHT_YEAR -DDEBUG -DCHAR_BIT=8 -I src/ -q 2>&1 | sort -u | \ xargs cppcheck --enable=all --inline-suppr --suppress=missingIncludeSystem --cppcheck-build-dir=$CPPCHECK_DIR -j "$(getconf _NPROCESSORS_ONLN)" --language=c++ --std=c++17 --template=gcc -D__cplusplus -DENABLE_WALLET -DCLIENT_VERSION_BUILD -DCLIENT_VERSION_IS_RELEASE -DCLIENT_VERSION_MAJOR -DCLIENT_VERSION_MINOR -DCOPYRIGHT_YEAR -DDEBUG -DUSE_EPOLL -DCHAR_BIT=8 -I src/ -q 2>&1 | sort -u | \
grep -E "${ENABLED_CHECKS_REGEXP}" | \ grep -E "${ENABLED_CHECKS_REGEXP}" | \
grep -vE "${IGNORED_WARNINGS_REGEXP}" | \ grep -vE "${IGNORED_WARNINGS_REGEXP}" | \
grep -E "${FILES_REGEXP}") grep -E "${FILES_REGEXP}")

View File

@ -37,5 +37,11 @@ src/test/dynamic_activation*.cpp
src/test/evo*.cpp src/test/evo*.cpp
src/test/governance*.cpp src/test/governance*.cpp
src/unordered_lru_cache.h src/unordered_lru_cache.h
src/util/edge.*
src/util/enumerate.h
src/util/irange.h
src/util/ranges.h
src/util/ranges_set.*
src/util/wpipe.*
src/wallet/bip39* src/wallet/bip39*
src/wallet/hdchain.* src/wallet/hdchain.*