Sign inSign up

elliotlyons/detect-antipatterns

By elliotlyons

•Updated over 3 years ago

Product name: Detection of Antipatterns in a C++ Environment or DANCE

Image
0

10K+

elliotlyons/detect-antipatterns repository overview

We aim to solve a number of anti-patterns with this software. These largely fall under the umbrella of concurrency and are as follows:

  • Calling out of locked scope.
  • A data member locked in some, but not all methods.
  • Bad locking order of multiple locks.
  • Manual lock/unlock - should use RAII.
  • Exiting a scope that has a manual lock but missing unlock.
  • Return a reference to shared data from a locked scope.
  • Using atomics in ways that aren't actually thread safe.
  • A data member that is accessed under a lock, but is also public so can be read/written directly.
  • Public mutex members.
  • "Immutable class" with one mutable field.
  • A class with std::thread member, but no join or detach in the destructor.
  • Joining a thread without checking if it's joinable.

Should a C++ file contain one or more of the above anti-patterns, the program will flag it. The aim is to detect problems earlier in software's lifecycle.

Tag summary

Content type

Image

Digest

sha256:d956704fa…

Size

383.9 MB

Last updated

over 3 years ago

docker pull elliotlyons/detect-antipatterns