summaryrefslogtreecommitdiff
path: root/git-hooks
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Fix syntax error in sanity bot.Jake Petroules2016-06-221-1/+1
| | | | | Change-Id: I0d558fa1d81a265bceff0828fbeb5910693ee894 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update Apple terminology warnings in sanity bot.Jake Petroules2016-06-221-10/+16
| | | | | | | Darwin for desktops is now called macOS. Change-Id: I7dcfc37a14563398fede004951deec5c53cbd7b2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* don't use List::Util::anyOswald Buddenhagen2016-04-131-2/+2
| | | | | | | | it's too new for the perl version on the bot. Change-Id: I18b92b5d2c802966e7ada59d80fd08b7bbcc3853 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
* Object to adding defective PNGs (usually bad sRGB chunks).Edward Welbourne2016-04-121-0/+31
| | | | | | | | | Some tools warn about them and they are (usually) superfluous. Only tests if you have the ImageMagic package's identify command. Ossi assures me this is adequately widely installed for Gerrit. Change-Id: Icd6f47fb0695e287f7de9d45b3521c82cc85cecd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* don't let a .in suffix hide files from the tab check exceptionOswald Buddenhagen2016-04-081-1/+1
| | | | | | | | most of the files in this list can plausibly appear as input for QMAKE_SUBSTITUTES (or a similar mechanism). Change-Id: Iae54b2e1a9f958e83ef9979818125ccaa7f511bb Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* update commit-msg hook to the one from gerrit 2.7Oswald Buddenhagen2016-03-021-38/+109
| | | | | | | | the main change is that the worker code was rewritten in awk instead of perl. Change-Id: I57b8c887eec00c4baf92f96d366a5e91efb07dee Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* fix trailing whitespace check in commit messagesOswald Buddenhagen2016-01-131-1/+1
| | | | | | | the linefeed has already been chomp()ed at this point. Change-Id: Id8060166a791a61b5c5edc051590924c313477b8 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* use git-cat-file instead of git-log to get commit messageOswald Buddenhagen2016-01-131-11/+11
| | | | | | | only this way we can ensure that we get it really verbatim. Change-Id: I0d11a1b87fcacf7cc3b9473b05562f5af2b677d2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* don't print an extra newline in diff header parse failure messageOswald Buddenhagen2015-12-211-1/+1
| | | | | Change-Id: Ibe229236bc56e9b32dfd8c8f508bc8b7b0b4736a Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* tolerate non-json output in front of json content from workerOswald Buddenhagen2015-12-181-0/+3
| | | | | | | | this avoids that die if the worker emits any warnings or errors before the verdict. Change-Id: I7e5e6ec71983eb2352bf83e4a300c3a6e0a090c2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* invite reviewers before posting reviewOswald Buddenhagen2015-10-231-8/+8
| | | | | | | | | it sort of makes sense that the persons actually see why they are being invited. Change-Id: Ie6cf006fc2e137d439924774ff0808cda8c42626 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
* Upgrade Q_OS_MAC / qmake mac warning to a -1 sanity review.Jake Petroules2015-09-151-6/+4
| | | | | | | This follows Q_OS_MAC's deprecation in qtbase. Change-Id: I3705cf612c548d6de4470279c42a86e0756e93dc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* we pretend that perl is c-like, so handle 'elsif' as well.Oswald Buddenhagen2015-07-141-1/+1
| | | | | Change-Id: Ie98bcf97746b167ef83d167b2f1a8b39dae6fdea Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* fix email/name complaints not being bound to the commit messageOswald Buddenhagen2015-04-161-8/+8
| | | | | | | | | | | | | the idea to set the commit-message-indicating "file name" only after entering the body of the message backfires in REST mode, as there the author/committer are displayed as part of the commit message. so instead start out with attributing reports to the commit message, and interpret a negative line number as an "escape" to the cover message (used in non-REST mode). Change-Id: Ib0c810e054ded94aa29768cbc89db10e5df78574 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* make work-in-progress marker match even stricterOswald Buddenhagen2015-04-131-1/+1
| | | | | | | | | | | observed conventions: the marker is typically used at the beginning of the summary, optionally in square (or angle) brackets, optionally followed by a colon - all-lowercase, all-uppercase, or capitalized. alternatively, it's used somewhere else in the summary, but always in all-uppercase. Change-Id: I52b3eb2162f281450aebe6b770ba4639ed1557b2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* permit "da" name infixOswald Buddenhagen2015-04-071-1/+1
| | | | | | Change-Id: I84d54f4eff5abc6f14e8fc44ab1edbae27691531 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: Raphael da Silva Couto <raphael.couto@gmail.com>
* Adjust wiki links to the new redirectSergio Ahumada2015-03-031-2/+2
| | | | | | | it looks nicer this way Change-Id: I3efe1c72aa51982a0d9c23f764856df1b2096d55 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Replace old qt-project.org wiki with wiki.qt.ioSergio Ahumada2015-03-021-2/+2
| | | | | | Change-Id: I405ac311dc91f565c0a46b76eca1b89961df735e Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* add stable hash mode for output comparison in autotestOswald Buddenhagen2015-02-251-0/+8
| | | | | Change-Id: Ibd5164645b913a721164f6a86c83b8919e2be134 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* add exception for git-gpush footersOswald Buddenhagen2015-02-231-1/+1
| | | | | | | "GPush" doesn't match the (intentionally strict) "[A-Z][a-z]+" pattern. Change-Id: Ia3851e2f3548c6e700d6208e191b2f17fbcd5c9b Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* complain about urls and change-ids in summary lines as wellOswald Buddenhagen2015-02-201-6/+6
| | | | | Change-Id: I360daf9951d5cad26410bd9b64e24af70e24c261 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* move the work-in-progress detection to the bot itselfOswald Buddenhagen2015-02-133-8/+18
| | | | | | | | | | | | | | it obviously makes no sense when the sanitizer is executed locally. additionally, this allows us a different treatment of WIP reports: instead of giving a -2 sanity review, give a -2 code review. that way the change owner is not spammed by useless notifications (because the sanity review itself is positive, so the message is suppressed by the gerrit configuration). Change-Id: I10bc8f8f61673e75983dcb91310836d59c434483 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-117-13/+13
| | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: If3c8d221bcf8e5010048ed5f1c50cd35c04e7199 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Skip tab check for .go filesSimon Hausmann2015-02-051-1/+1
| | | | | | | Go source code managed via go fmt mandates tabs Change-Id: I9cbefcd7b7bb959b22aaa10937189d086d368e9e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* remove regex /u modifierOswald Buddenhagen2015-02-041-1/+1
| | | | | | | | it's pointless (the doc says it's basically internal) and breaks msysgit's perl. Change-Id: Ia2d728dce57d6a447a720622a716c5deab0e7595 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* move file watcher functionality from sanitizer to botOswald Buddenhagen2015-02-032-10/+50
| | | | | | | | | | | | watchers are really pointless when sanitizing local commits, especially as nobody actually has the relevant configuration. as an additional boon, the bot can now automatically invite relevant people. Change-Id: I735056845d7f807904070e61efb54407dcec9fb9 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* generalize footer complaintsOswald Buddenhagen2015-02-031-22/+24
| | | | | | | | | | there is no reason to restrict them to ChangeLog surroundings. also complain about any regular text following footers, as that is just bad style. Change-Id: Id3a0d07eb9d45d27629c82451713d8cea9a68a09 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* make apple hints more specific and less redundantOswald Buddenhagen2015-02-031-2/+2
| | | | | | | | | make the regexes for qmake more strict. on top of that, zap the matched strings, so they don't trigger the terminology warning as well. Change-Id: I0404c49ad55d2d1565828d78fca85108e792e20e Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* automatically invite maintainers when bot produces too much outputOswald Buddenhagen2015-02-021-0/+13
| | | | | | | | | conceivably, this mechanism could be used in more cases, for example on -2 reviews. however, this would need some additional tagging by the worker script - every WIP is a -2 ... Change-Id: Ib10777089926164b70dc3b7dd46c2fb526ecf165 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* move message quoting to a more logical placeOswald Buddenhagen2015-02-021-3/+5
| | | | | | | quote it right before building a command line. Change-Id: I5bd95dbe2fc392b974b730189277a62ae6ae59d5 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Unify the use of shSamuel Gaist2015-01-302-2/+2
| | | | | | | | | Currently there's a mix between bash and sh in the scripts. This patch aims to unify the use of sh since there's no code involving bash specific features Change-Id: I30fdae59511b72910facf5e5be3bb9827f4f537c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* complain about suspicious author/committer real namesOswald Buddenhagen2015-01-301-4/+38
| | | | | | | whitelisting is supported as well Change-Id: I852ca6b70bf2424732a4b252ba9ce959e2794485 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* make the w.i.p. detector a bit more strictOswald Buddenhagen2015-01-281-1/+1
| | | | | | | | specifically, don't complain about references to wip/ branches. also, don't be excessively case-insensitive . Change-Id: I0fa1ee32d8c8381dad42a67e03e89ad346fbdff7 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* complain about multiple tasks in one task-number lineOswald Buddenhagen2015-01-281-2/+3
| | | | | | | | | | | this specifically assumes that people use commas (which covers about 90% of the cases). catching spaces would be possible as well, but people tend to attach freestyle comments to the references, so the number of false positives would be prohibitive without an elaborate parser. Change-Id: If842d47d877c44867983e6696e2300e78470c344 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* downgrade the redundant repo complaint to a hintOswald Buddenhagen2015-01-281-1/+1
| | | | | | | | | | many repos contain multiple modules, one of which is named like the repo itself. in these cases it's entirely reasonable to still name the module for symmetry. Change-Id: Icab8149600d446ebb2dcc784ba3e40ee5dc4a4c4 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* add missing docu for 'excluded' optionOswald Buddenhagen2015-01-271-0/+3
| | | | | | Change-Id: I24fa6b68b66b66e0339fbd593b78f10d805d51f2 GPush-Base: a2b0d053d4200b816cb811338308fb47b3216ad4 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* re-implement executable detection without external 'file' commandOswald Buddenhagen2015-01-121-2/+3
| | | | | | | | ... for windows-compatibility. as a side effect, it's also faster. Change-Id: I7b3e83abd832bdf3f35acf9894c101ee7402e698 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* ignore submodule updates in diffOswald Buddenhagen2014-11-261-1/+1
| | | | | | | this avoids that we blow up on submodule updates inside merges. Change-Id: I5608554ae4991b379219199c32e2394c3a0b1518 Reviewed-by: Orgad Shaneh <orgads@gmail.com>