Skip to content

semgrep rules for finding non-determinism and missed error handling in Python, Go and Java source code.

License

Notifications You must be signed in to change notification settings

disconnect3d/semgrep-rules-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

semgrep rules

This repo holds patterns for finding non-determinism and missed error handling in Python, Go and Java source code.

The rules engines currently supported semgrep.

To run a single semgrep rule:

$ semgrep -f rules/<type>/<lang>/<rule>.yml .

To run all semgrep rules:

$ semgrep -f rules/<type>/<lang>/ .

Semgrep checks:

Rule Python Go Java
assumption-timezone Yes
comparing-with-current-time Yes Yes
comparing-with-float-numbers Yes
comparing-with-unordered-data-structure Yes
missed-retries-on-access Yes
random-seed-depends-on-current-time Yes
synchronization-with-sleep Yes Yes Yes

References:

  • An empirical analysis of flaky tests - Qingzhou Luo, Farah Hariri, Lamyaa Eloussi, Darko Marinov
  • Empirical Analysis of Factors and their Effect on Test Flakiness - Practitioners’ Perceptions - Azeem Ahmad, Ola Leifler, Kristian Sandahl
  • Root Causing Flaky Tests in a Large-Scale Industrial Setting - Wing Lam, Patrice Godefroid, Suman Nath, Anirudh Santhiar, Suresh Thummalapenta
  • What is the Vocabulary of Flaky Tests? - Gustavo Pinto, Breno Miranda, Supun Dissanayake, Marcelo d'Amorim, Christoph Treude, Antonia Bertolino
  • Eradicating Non-Determinism in Tests - Martin Fowler

About

semgrep rules for finding non-determinism and missed error handling in Python, Go and Java source code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 67.0%
  • Java 20.7%
  • Go 12.3%