summaryrefslogtreecommitdiffstats
path: root/git-hooks
Commit message (Collapse)AuthorAgeFilesLines
* Permit the use of MAC/mac again in commit messages/contentSimon Hausmann2019-03-151-1/+1
| | | | | | | | | | | | | Once in a while somebody runs into the bot complaining about the use of "MAC" when it's perfectly fine. For example in the context of "MAC address". This is quite annoying and less helpful than perhaps intended. So this change removes the trigger-happy part of the check but keeps the more clearly defined potential uses of old terminology from Apple. Fixes: QTQAINFRA-2800 Change-Id: If6b9cfbd0a808b424ffc93728fcc66939f5ad6ee Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Don't check spacing in test-dataEdward Welbourne2018-10-311-0/+2
| | | | | | | | | | | | | | | We have a general convention of storing test data in testdata/ sub-directories alongside their tests. This data is whatever it needs to be, for whatever the test may be doing, so we don't want to waste cycles commenting on its spacing, or spam reviewers with the results. Adding this exception might even encourage those maintaining tests with such data to adopt this (already common) convention and make it easier for others who encounter tests to know where to find their data. (I'll start with testlib's selftest's expected_* data when I can find the time.) Change-Id: Ib27b75e858e0573a65540787f4ccae6b2383bc3d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Add Fixes: tag to sanity botFrederik Gladhorn2018-09-041-1/+4
| | | | | | | Change-Id: I80b9e149675a13810cfa1164d97b1902d1ceb792 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add Fixes in gerrit_commit_msg_hookFrederik Gladhorn2018-08-311-1/+1
| | | | | | | This ensures the footers look nice. Change-Id: Ie8c61dbf39ceaccdc47e69764385ea252ab961af Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* sanitizer: slightly refactor initialization of $eof_checkOswald Buddenhagen2018-08-211-5/+4
| | | | | | | ... so it's more consistent with the other flags. Change-Id: Ic2eae23ed10594f7adab7f5980852294252923d9 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* sanitizer: exclude 3rdparty from eol-at-eof checkOswald Buddenhagen2018-08-211-1/+1
| | | | | | | | the eof is part of the content (and not just a git attribute, like the eol style), so it makes no sense to enforce our style for 3rdparty. Change-Id: I6cdfd4f3bf14ddab9e6cb2531547b97f5b96cbc8 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* accept dashes in branch names in move requestsOswald Buddenhagen2018-03-191-1/+1
| | | | | | Change-Id: If351a93f6959406e032e85c8e0238af87333a727 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* sanitize-commit: recognize cross-repo cherry-picksOswald Buddenhagen2018-03-191-3/+5
| | | | | | | | we don't validate them, though, as we have no access to the source repository. Change-Id: I8eea89506aca007cb2413d24632904ab81119cae Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Include the prior branch in gerrit-bot's "Moved" messageEdward Welbourne2018-02-271-1/+1
| | | | | | | | | | | Having now seen moves using the bot in practice, I find that reviews after a move typically give no hint to which branch they were on *before* the move. Though usually unimportant, it's sometimes of interest to a reviewer. Change-Id: I2462ca2033a7f9007ff5dc226dc6674b04b4e4fb Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* declare 5.9 a cherry-pick branchOswald Buddenhagen2018-02-121-1/+1
| | | | | Change-Id: Ibd1c42ab4bbe2592b3f9116546f0e5342180d139 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* gerrit-bot: comment out status check in move command processingOswald Buddenhagen2018-01-121-3/+4
| | | | | | | | | | contrary to expectations, the 'status' field is simply missing from the event streams change object. we'll let the worker script complain about the problem instead. Change-Id: Ie7cc6af462372f52a1e942fec836c680f0f51dd2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* gerrit-bot: support slashes in branch names in move requestsOswald Buddenhagen2018-01-121-1/+1
| | | | | Change-Id: Ifcace60957cf2383effaaa23adcd7e1509d04066 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* gerrit-bot: fix hash indexingOswald Buddenhagen2018-01-121-1/+1
| | | | | | | amends 21ec987901. Change-Id: I8d04359bbaa77096f7c8d4e446978c65cb2eea19 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* sanitizer: add support for multiple cherry-pick branchesOswald Buddenhagen2018-01-101-22/+40
| | | | | Change-Id: I12e152f10cbd0fca8950854d41847d6de8225159 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* gerrit-bot: Validate change status on moveOrgad Shaneh2018-01-091-3/+6
| | | | | Change-Id: Ideca76f81632a4d886193b8a8529aa9682b84066 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* sanitizer: recognize nobiliary particle 'du' in realname checkOswald Buddenhagen2018-01-081-1/+1
| | | | | | | Task-number: QTQAINFRA-1672 Change-Id: I4bc20293b566dd02ac8ece3a55e2364df53a4baa Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Match "new mode" as well as "new file mode" in permissions checkEdward Welbourne2018-01-081-1/+1
| | | | | | | | | | | The permissions check was only looking at "new file mode", which is only present for new files. For existing files, when they change mode, the line says "new mode" instead. So match that, too. This catches what qtbase/ffc8409aa58c04c1dd140001976b55925ac959f6 did wrong. Change-Id: I07b30c1b88c067c3f90888ff3b212b15a9384134 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Automatically move change upon requestOrgad Shaneh2018-01-081-0/+44
| | | | | | | | | | | | | | | | | Let the gerrit bot listen to comments and process move requests in the form: "bot: move to 4.5". This should replace the current method for moving a change, which is to ask ossi or fregl. Only the change owner is allowed to request moving the change. Resume is not needed because the bot is up most of the time, and unlike the Sanity-Review label, this can be easily retriggered by the user in case of failure. Change-Id: I5b89fb8e38b0e0af2b7a4f20a5b29412493fb72e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Teach sanity-bot to ignore Lorem ipsumEdward Welbourne2017-10-161-0/+4
| | | | | | | | It triggers on some of the testlib selftests, to my repeated irritation. Change-Id: I220ef37b5579abe201a35ff186a07c4da4bf89cf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Change the permission-check to use a short whitelistEdward Welbourne2017-10-131-5/+5
| | | | | | | | | | | Rather than adding .txt and .ttf (recently witnessed) to the list of suffixes on files that shouldn't be executable, rearrange the test to actively recognize files that should be executable, complaining if any others are executable. In the process, remove .pm from the executable script list; #!/usr/bin/perl doesn't make sense in a .pm, only in .pl Change-Id: I9b0de48443d04f930677ae8f64959ed26343fa35 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* sanitizer: accept aNy cASe in remainder of first word of footersOswald Buddenhagen2017-08-221-1/+1
| | | | | | | | | otherwise we complain about "LLVM-bug", which is not helpful. this also removes the now-obsolete GPush special case. Change-Id: I22bb22cd29e152dce9d21a1bb7e7aece837266f7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Accept lower case "la" as part of a real nameAndre de la Rocha2017-08-161-1/+1
| | | | | | | | Changes the sanity script to accept "la", which is common in Spanish names. Change-Id: I90bbd0da74631d27e73d9ed9e35f6fc5252ba1aa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* fix copyright checkJesus Fernandez2017-08-081-2/+2
| | | | | | | | The variable $no_copyright was getting an incorrect value due to a typo in the regular expression. Change-Id: Ia99bb32f0c9c2bba3fff50662059ff03ab6cf556 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* make the size complaint less confusing for files right above the limitOswald Buddenhagen2017-06-281-2/+2
| | | | | | | | | "50KiB > 50KiB" is mathematically wrong, and is an artifact of the first number being rounded down. so instead complain about >= 50KiB. Change-Id: Idebaebcd7e1b432ea37dc2b0c9ed6d0705b47c92 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* permit tabs in qt 3d studio filesOswald Buddenhagen2017-06-141-1/+1
| | | | | Change-Id: Ic85f5fced6c6587f48c6f54512bf681543f887ab Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* rewrite watch handlingOswald Buddenhagen2017-06-121-20/+12
| | | | | | | | | | fundamentally change how the data is queried from git. this has some marginal unnecessary cost for the case where no applicable watches are actually present, but the code is clearer this way. Change-Id: I0a89401a9f199b69da7471ca551178f5d89b8a4f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* separate fixup check from w-i-p checkOswald Buddenhagen2017-06-121-1/+4
| | | | | | | | it doesn't really make sense to claim wip for a neglected squash. Change-Id: I30245ff57142bebbdd2e29ff4160ccb7c427392e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* factor out watches and w-i-p handling to separate workerOswald Buddenhagen2017-06-122-85/+173
| | | | | | | | | | | | | originally, the idea was to have one gerrit-bot instance per worker, but that would result in an (even greater) flood of comments. so all functionality that didn't fit into sanitize-commit was added to gerrit-bot. at this time it's getting messy, so clean it up by making it a plain launcher/dispatcher again, with the ability to run multiple workers on a single commit. Change-Id: I8c04f449726793b99e9f1ac5c6db330a1f17389f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* don't complain about missing copyright headers in 3rdparty codeOswald Buddenhagen2017-04-271-1/+1
| | | | | | | | | it's pointless. Change-Id: I7f9eec32134ba2793ec8015ebccce6cea33867ec Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Teach sanitize-commit not to grumble about tabs in *.mk filesEdward Welbourne2017-04-271-1/+2
| | | | | | | | | | The suffix .mk is commonly used for non-primary make-files (such as are invoked with make -f or pulled in by make's include directive). Complaining about leading tabs in Makefile is already avoided, so do the same for *.mk files. Change-Id: Iceff9f65ccdcc716babb8c738dd1d6141e08ea2a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* support prefixes in summary mood detectorOswald Buddenhagen2017-03-201-1/+1
| | | | | Change-Id: I91bc2e7d7b89a9036ad962d89b72a5fabb47c6f1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* move assignment of Sanity-Review JSON field to sanitize-commitOswald Buddenhagen2017-02-222-9/+7
| | | | | | | | | | the worker knows gerrit's JSON format and the meaning of the field's values anyway, so putting the field name there as well actually improves locality. Change-Id: If1ee5a5e54bb041244dcc986b6236de504522c2f Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* prune non-REST gerrit code pathsOswald Buddenhagen2017-02-222-70/+39
| | | | | | | | we've been on gerrit 2.7 for long enough. Change-Id: I7ee344b724b103594c196fc394b9bdc7349ee36c Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* gerrit-bot: use separate account to invite reviewersOswald Buddenhagen2017-02-221-1/+5
| | | | | | | | | | notification mails from the sanity bot are suppressed for users not owning the change, so the invited reviewers would never get a proper invitation. Change-Id: I4bb816a3a5178cba01fe11016c46ae933807a454 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* don't tab-check svg filesOswald Buddenhagen2017-02-131-1/+1
| | | | | | | | | adobe illustrator's export function creates tabs, and it would be unreasonable to clean that up. Change-Id: I94555a7f2e2f6c9b153a8d5f5395b8972f410e88 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* add validation of cherry-picksOswald Buddenhagen2017-02-031-1/+88
| | | | | | | Task-number: QTBUG-55945 Started-by: Edward Welbourne <edward.welbourne@qt.io> Change-Id: Ifd2fd9dde62606ec67076e69bd24ec5a5be1c9e9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Teach sanity bot to warn about mood in commit subjectTor Arne Vestbø2017-02-011-0/+4
| | | | | | | Commit subjects should be written in the imperative, present tense. Change-Id: I99f1864af18c546704011d24aeeae05d8f2b7631 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix glitch in detection of misguided executable permissionsEdward Welbourne2016-11-211-1/+1
| | | | | | | | | Sanity-bot regards *.pl as C-like code; unlike the other kinds of file it regards as C-like, perl scripts are sensible things to make executable. So make an exception for them. Change-Id: Ibbfea2149a3b735baac4424af51b55bcb5bca090 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* sanitize-commit: warn about obsolete addressesOrgad Shaneh2016-10-251-0/+7
| | | | | Change-Id: Ied3d6b8ce07473611515b99d68b19fdf8fe6f283 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* exclude pbxproj from tabs checkOswald Buddenhagen2016-10-191-1/+1
| | | | | Change-Id: Ib57adfb3082e6937a3e4983e93629a299b0b6fe8 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* ignore missing trailing eol in .json files within xcassetsOswald Buddenhagen2016-10-191-1/+1
| | | | | Change-Id: I3a38d2dedc96bbe4aa814ceb008f1b08982fe586 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* sanitize-commit: check for suid permissions on new filesEdward Welbourne2016-09-281-1/+6
| | | | | | | | Alongside misguided execute permissions, check for set*id permissions; git won't propagate them, but there's no way they're a good sign. Change-Id: Ie3499ec79fd275d6f9cd0cb331c9cf2165ba7949 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* sanitize-commit: check for misguided permissions on new scriptsEdward Welbourne2016-09-281-0/+14
| | | | | | | | | Even scripts normally shouldn't be executable unless they start with a suitable #! line (although sometimes they'll be run explicitly via their interpreter). Change-Id: I8d3371199d6f51e79f1d9ab051086448ee9c2b95 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* sanitize-commit: check for misguided permissions on new filesEdward Welbourne2016-09-281-3/+12
| | | | | | | | | Sporadically someone commits a source file, image or similar with execute permission. Let's catch that when it happens; I'm getting bored of fixing it after the fact. Change-Id: Ifb8be33f3d0be48466d5613efac09ed6a42fc3e5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix hand-crafted symlink resolutionJames McDonnell2016-09-271-1/+1
| | | | | | | | The base directory for making the symlink target absolute is of course the dirname of the original file, not the target itself. Change-Id: Ide12b77a724aa9f1fcb2512cbd0ada2a98f44303 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* sanitize-commit: declare some variables closer to their userEdward Welbourne2016-09-271-11/+11
| | | | | | | | | They were declared alongside some globals used across a broad span of the file; but were only used locally to the parsing of the commit message. Change-Id: I9ad563dbdfba6451d934b153f0b5d8cd833c7da8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* sanitize-commit: we now have .json source files we care aboutEdward Welbourne2016-09-271-2/+2
| | | | | | | Added by the new configuration machinery. Change-Id: Idf652e104dd6973fd60b099fd622d471a9dc89dc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Do not complain about 2 trailing spaces in md filesOrgad Shaneh2016-09-231-0/+5
| | | | | | | Markdown uses two trailing spaces for non-paragraph line breaks. Change-Id: Ib5330fbd9cd4718a45afa62966be46c55a9db338 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* complain only about summaries longer than 72, not 70 columnsOswald Buddenhagen2016-06-291-1/+1
| | | | | | | | | | | | | it's kinda stupid to complain about something the commit template leads one to do. the wisdom of the template is debatable. github in particular will make an ellipsis after column 69. and the official recommendation is 50. Change-Id: I7a4aed1867f4f9ab15fe513b92b80c0eed37dd07 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Teach sanity bot to look for subject lines ending with a periodTor Arne Vestbø2016-06-281-0/+3
| | | | | | | | | | | Trailing punctuation is unnecessary in subject lines. It's a title, and titles do not end with periods. Also, it leaves one more char to use for subject content without breaking line length. http://chris.beams.io/posts/git-commit/ Change-Id: I63199b25373ae428e6417ab7d5e90470ce3dd42b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>