Commit graph

29 commits

Author SHA1 Message Date
Finn Thain
6ff333968a Improve regexps to avoid some false positives
Commit fbcca4a9d1 changed a grep command in an attempt to prevent a
false positive, that is, to prevent grep from matching python code not
actually using the banned 'past' module. Problem is, (?!e) is not valid
syntax unless grep was compiled with support for Perl Compatible Regular
Expressions. However, we can use extended regexp syntax to avoid the
false positive. While we're at it, let's make similar improvements to
the other regular expressions to prevent more false positives.
2026-07-02 15:51:11 -07:00
Dan Smith
1e2049aae9 Add wx import check to check_commit.sh 2026-06-30 16:27:53 -07:00
Dvořáček Josef
b480aa72c1 tools/check_commit: enforce whole-word six/future detection
Fix word-boundary matching in check_commit six/future checks.
2026-06-01 16:42:15 -07:00
Dan Smith
d90e2c6a5d Update check-commit to enforce proper commit message summaries 2025-08-17 11:19:34 -07:00
Alexandre J. Raymond
2c14a4341a check_commit.sh: fix errors stemming from git commands not using --
fatal: ambiguous argument 'tools/cpep8.manifest': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
2025-06-03 16:48:48 -07:00
Dan Smith
de741e9394 Add pr check for print() 2025-05-27 16:50:31 -07:00
Dan Smith
d74423a217 Make check_commit look for modified images
Test images modified with code could signal upgrade issues, so make
check_commit highlight those potential situations.
2025-05-27 16:02:37 -07:00
Tony F
fbcca4a9d1 check_commit.sh: Ignore word paste 2024-02-23 16:05:23 -08:00
Dan Smith
b85efbd4ac Add commit check banning the use of eval() 2024-02-07 15:49:29 -08:00
Daniele Forsi
cf8bca38d8 Fix the check for lines added to cpep8.manifest and cpep8.blacklist
It was grepping a file name in the list of added lines.
2024-01-21 14:25:09 -08:00
Dan Smith
3c1ff5b16b Disable match_model PR check because it's too dumb
We need to stop implementing this, but it should be defaulted to
just "return False" but we don't have a super good way to do that
really.
2023-11-24 11:24:42 -08:00
Dan Smith
cf4eefd021 Only check added python files for sameness 2023-11-22 08:29:21 -08:00
Dan Smith
2f28fccd1c Change common-file check definition
This makes us grab the "percent in common" stat for the new file being
added instead of just looking at the "percent changed" for the old one.
The latter ignores what may be a large amount of things considered to
be deleted, making the change amount look larger.
2023-11-22 08:29:21 -08:00
Dan Smith
6301c58554 Check for new instances of match_model()
This method should not be implemented by new drivers, so fail the
check if it looks like it is present.
2023-11-05 10:58:51 -08:00
Dan Smith
5f14b51a82 Fix check_commit for added image files
This makes us not log errors when a binary image file is checked
against existing drivers.
2023-10-26 17:51:28 -07:00
Dan Smith
e20d445440 Update check_patch to look for similar drivers 2023-07-04 08:49:10 -07:00
Dan Smith
d9a8f48196 Amend check_commit and PR template
Require GPLv3 license and check for violations.
2023-07-02 20:40:10 -07:00
Dan Smith
fb7982b3af Add PR check for added driver with no added image 2023-06-18 20:54:30 -07:00
Dan Smith
95b388d0be Fetch full history for check-patch test
Also clean up the reporting for locale files needing update.
2023-06-14 18:22:34 -07:00
Dan Smith
97d8af35ff Avoid confusing __( for _( in check_commit 2023-03-14 21:28:20 -07:00
Dan Smith
360d75e995 Add warning to top of cpep8.manifest 2023-03-10 18:07:04 -08:00
Dan Smith
f2052d66ac Fix untranslatable driver prompt strings
Long ago, an anti-pattern was introduced by a driver whereby the prompt
string were marked for translation, but wrapped around a call to
dedent() for formatting. In order for gettext to pick up the strings
when building the catalog, the actual literals must be marked. Even
though the gettext call works at runtime, the static analysis does not
understand enough python to push through that call.

This is the first step of re-writing all those instances to avoid
using dedent() and instead use multiple string lines inside the gettext
call. This was done en masse, so it's possible that some of this is
not right, but it's a good start and much more reasonable than doing
it manually in so many places.

This also includes a dumb rule in check_commit.sh to help prevent
future introduction of this, although it won't catch all cases.

Related to #10434
2023-03-10 15:48:15 -08:00
Dan Smith
ed829f5b4b Check patches to see if locale files need update
This makes msgmerge use sorted output to make the files stable.
2023-03-06 18:15:14 -08:00
Dan Smith
c4f0c614c9 Updates to check-patch job
Log the base and commits we are checking and also relax the
check for merges, since we seem to not be catching them in the
github workflow.
2023-02-23 16:01:43 -08:00
Dan Smith
548101122d Check for merge commits in PRs 2023-01-28 08:51:26 -08:00
Dan Smith
c83d09343c Fix check-patch CRLF detection 2023-01-15 21:33:37 -08:00
Dan Smith
2c125a1ba5 Make check_commit detect CRLF files 2023-01-15 21:10:17 -08:00
Dan Smith
502e982a64 Add MemoryMapBytes to check_commit.sh
Make sure we don't add new drivers with non-byte-clean MemoryMap
objects.
2023-01-04 15:13:33 -08:00
Dan Smith
3641406a9b Add check_commit.sh and github action
This enforces some commit requirements, such as not adding new code
that relies on py2 compatibility.
2022-12-31 11:01:11 -08:00