Commit Graph

2 Commits

Author SHA1 Message Date
Mateusz Mandera 0e4532f8e7 semgrep: Add rule to specify tick kwarg on time_machine.travel() calls.
Letting the clock tick without a reason introduces the
possibility of nondeterministic test failures depending on the execution
time. The default value when not specified is tick=True, which makes it
easy to miss.
The rule doesn't prohibit setting tick=True, as perhaps there will be
tests wanting to use that feature on purpose, but such a test should
explicitly set it to make the intent clear.
2023-10-01 09:28:42 -07:00
Anders Kaseorg f4768b0030 lint: Fix semgrep scanning of extensionless Python scripts.
Semgrep 0.118.0 changed the default of --scan-unknown-extensions to
false.  It also seems that it no longer respects --lang (or never
did), so rename the config file to reflect that it only includes
Python rules, to make it clear that additional languages will require
separate config files.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-28 14:19:50 -07:00