Commit graph

63 commits

Author SHA1 Message Date
Mike Kaganski
18ff318c75 Revert "Drop allownonascii check from pre-commit checks"
This reverts commit 8a0015c35f.

See https://lists.freedesktop.org/archives/libreoffice/2023-December/091265.html
for details.

Change-Id: I9bfa893af935587c7a4681e71b13a734d5f50b5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160177
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-02 21:55:33 +01:00
Mike Kaganski
8a0015c35f Drop allownonascii check from pre-commit checks
Supposedly, at this day and age, it is OK to use non-ascii file names.
Specifically, this is intended to allow such names for bugdocs, which
allows simpler testing of problems with handling those.

An alternative would be to rename bugdocs at runtime; but that still
requires that the target filesystem supports such names, so...

Change-Id: I25da2402f311d59c5777c4cd302147d6965dea5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160217
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-01 16:13:32 +01:00
Taichi Haradaguchi
eca4e82cac Fix typo in .git-hooks/pre-commit
...to avoid a error "Cannot run git diff-index. at .git/hooks/pre-commit line 51." that occures on Windows.

Change-Id: I868e87940f9fcef950970b59e8cbe747f80c7198
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152830
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-06-20 02:10:44 +02:00
Xisco Fauli
b1d341738d related tdf#154946: check syntax in git pre-commit hook
Change-Id: If685f69227f98b194c124af0e28307d31edabf9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150752
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-04-21 14:15:18 +02:00
Juergen Funk
05ea4ac195 git-hooks: better handling in './g -z' with win-links
and linux-links

This patch improve patch
9afc6b22e2 git-hooks:
  overwrite the windows-links not with linux-links

The main problem with the previous patch is that
when an alias is set for git, this alias will not
map in the Shell script passed, better you
use a git-symlink.

The other problem was the behavior of cygwin-bash
and win-git-bash that is not always the same, e.g.
   - winlnk=$(cmd /C ... 2>&1) it hang infinity,
      line 123
   - the 'ln' made not link, it only copy the files

Improving the FOR in ./git-hooks/README, when
you have the copied files, need a other del command

The patch can not set the windows-links, only output
the ./git-hooks/README
But in Win 11 should be possible, it is not needed
admin-rights for the 'mklink' command

Change-Id: Icecdb96e65fe2bba1270dfad2ac1af5af145925a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148462
Tested-by: Jenkins
Reviewed-by: Juergen Funk <juergen.funk_ml@cib.de>
2023-03-22 10:44:24 +00:00
Stephan Bergmann
ff5d23638b Restore .git-hooks/commit-msg
...that 729ae51350 "Update Sifr Mimetype Icons"
had modified, presumably in error

Change-Id: I077eeb2d304d145a68edceae7196417b329adaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148458
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-08 10:37:00 +00:00
Galdam
729ae51350 Update Sifr Mimetype Icons
Updated Sifr mimetype icons to match new app/mimetype icons

Change-Id: I4dda9bd4f342ed068bf1a10f9ffb23246685cc94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148429
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
Tested-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-03-07 22:03:12 +00:00
Juergen Funk
9afc6b22e2 git-hooks: overwrite the windows-links not with linux-links
Always when you call build or logerrit, then the windows-links
overwrite with linux-links, but when you using GIT for Windows
you need the windows-links.
This patch made a check it is using GIT for Windows, and check what
for link it is, when wrong link, it output the .git-hooks/README

Improve the check for links, when a link is set not need to set
the link anymore

In .git-hooks/README improve the FOR with delete of the wrong link

look here for GIT for Windows:
https://wiki.documentfoundation.org/Development/BuildingOnWindows/de#Cygwin_and_git

Change-Id: I9f6ef9aca316058ef74cb2b2d107236f03a2e2ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147458
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-03-01 10:44:25 +00:00
Xisco Fauli
0439823bd3 git pre-commit hook: check .mm files
Change-Id: I3e0e0845dab52ffa23ff7a072802da5c0374d200
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144833
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-12-27 12:10:02 +00:00
Xisco Fauli
383c309baa git pre-commit hook: check .bas and .vb files as well
Those are used in basic/qa

Change-Id: Idf444bbd540d3f23450db1586489f27df64e09a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144582
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-12-20 11:57:45 +00:00
Stephan Bergmann
c819aa0606 .git-hook: Emit some warning about clang-format and renamed files
...to avoid misguided clang-format'ing of previously excluded files, as
discussed in the comment at
<https://gerrit.libreoffice.org/c/core/+/142387/4#message-ce27921261661fe7488ef0564657dbb5b42fb5fa>
"sc: factor out common code in make files".

(Though this still doesn't warn about cases where some excluded file got renamed
and the excludelist wasn't updated and the user already erroneously
clang-format'ed the renamed file before this commit attempt.   Also, I don't
know how best to integrate this with libreoffice.autostyle, so just ignore
libreoffice.autostyle for now when any suspicious renames are detected.)

Change-Id: I8d176ce536548b67f5b2af100f579f362764b06b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142394
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-11 17:18:43 +01:00
Rene Engelhard
fd42cea5f3 replace egrep/fgrep calls with grep -E/grep -F
as egrep/fgrep is deprecated since long amd grep 3.8+ now actually warns
(e.g. "egrep: warning: egrep is obsolescent; using grep -E")

Change-Id: I5b10f05dffdd09081deb05cef974e3cdb2907315
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139614
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-09-08 14:43:53 +02:00
Xisco Fauli
ecd8508eaf git pre-commit hook: fix typo
This code was copy&paste from bin/ui-checkdomain.sh in
f3665d2a42
<Check UI interface domains in the git pre-commit hook>
and it was already wrong there.

Kudos to Julien Nabet for flagging it

Change-Id: Id2b16cf76f6e4f983dc59673b67ce369a84cffd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114762
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-28 12:30:34 +02:00
Xisco Fauli
f3665d2a42 Check UI interface domains in the git pre-commit hook
This will prevent bugs like tdf#141902 to happen

Change-Id: If81164c704ec17d3fee044aaa0ec9c16d474009e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114705
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-27 17:28:17 +02:00
Caolán McNamara
5df3c10070 replace stock button images
Change-Id: I9be83856c0dd15552a042f009464c279bf239848
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109199
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-15 17:37:36 +01:00
Caolán McNamara
e93267693f remove newly unused use-stock support
Change-Id: I235cf19e703be0a7ca9fdeeda0662c8e0ec54b63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109198
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-15 12:44:03 +01:00
Caolán McNamara
3831aa8114 drop newly added deprecated GtkAlignment instance
Change-Id: Iad8d15ffc89b48aca698553329cda643dd0b4406
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109260
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-14 20:21:53 +01:00
Caolán McNamara
4491cee27c replace margin-left with margin-start and margin-right with margin-end
Change-Id: Iee3cc8c22b393ca420d0ed68673c61fe7ef240ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108113
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-22 10:16:42 +01:00
Caolán McNamara
3b3c181e50 set all .ui min require version of gtk to 3.20
and update the version mentioned in our min req in the readme.xrm

follow up to

commit 0c9ccc7dbf
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Fri Oct 2 21:21:45 2020 +0100

    raise min version of gtk to 3.20.0

Change-Id: Ibae55c97e1ee577f4b7435d124cda6a21005ad0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104692
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-22 22:27:50 +02:00
Shiro Kawai
d73776daa4 tdf#134286: fix pre-commit hook to make hooks.allownonascii work
Even if hooks.allownonascii is set to true, the current code
compares "true\n" vs "true" and always rejects committing.

Change-Id: I75494f149db2537ad54230dd684f5dac9b43c8b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97213
Tested-by: Takeshi Abe <tabe@fixedpoint.jp>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2020-10-09 08:41:27 +02:00
Xisco Fauli
94e6eafefd git pre-commit hook: check OOXMLIMPORT and OOXMLEXPORT...
... are used in the right place

Change-Id: I49bfe2f03e519138ae78a7462afe98932a335365
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102264
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-09-09 08:38:50 +02:00
Juergen Funk
933dd275aa Info git-hook for GIT for Windows
when you using git for windows (faster) then the git-hooks
not work with "ln", it needs "mklink" from windows

Change-Id: I15981f44293186efd3fbaa5c1a044348034cef28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102032
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-09-07 09:30:52 +02:00
Xisco Fauli
77128b8396 git pre-commit hook: check min gtk3 version
See tdf#135442 for motivation

Change-Id: I6db67b7a39edeb6dd9d9d82fbaa9cb93362e09e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100588
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2020-08-12 16:38:13 +02:00
Thorsten Behrens
0724c35c28 Fixup pre-commit hook to work with worktrees
For git worktree setups, the hooks sit with the original repo
(usually the initial clone). Worktrees with older version checkouts
then miss the blacklist->excludelist rename, and consequently fail.

Change-Id: I5f60fabc7d5856c74d93c4ada54f57574e0fd1a9
2020-07-10 22:52:07 +02:00
Thorsten Behrens
493ae7a6bb replace usage of blacklist with denylist
.. and a few cases of instead doing blacklist->excludelist where that
made more sense.

Background and motivation:
  https://tools.ietf.org/html/draft-knodel-terminology-02

[API CHANGE] officecfg::Office::Canvas::DeviceBlacklist -> DeviceDenylist
[API CHANGE] officecfg::Office::Canvas::BlacklistCurrentDevice -> DenylistCurrentDevice
[API CHANGE] officecfg::Office::Common::Misc::OpenCLBlackList -> OpenCLDenyList

Change-Id: Ia35e25496bf0cc0692d5de4cb66bfc232d3a869e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98180
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-10 01:34:54 +02:00
Jan-Marek Glogowski
c5eb63edde git hooks: update commit-msg to Gerrit 2.16.15
This mainly replaces the whole AWK code with the git helper
"interpret-trailers", which was added in git v2.2 end of 2014.

It also moves the argument checks from the original Gerrit hook
to the front of our tests to verify the script arguments.

Change-Id: I38c831bf7c9d399419a598d6966e48166d31ea6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87369
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-02-01 04:14:09 +01:00
Miklos Vajna
cac5ce6de0 git hooks: update the change-id part of commit-msg
To the up to date version that is set up by e.g. 'git review -s' from
gerrit.libreoffice.org. Should help with \c in commit messages.

Change-Id: I42508f6f5bbb6fa70357694fcc820ed9a22f3b0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87347
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Tested-by: Jan-Marek Glogowski <glogow@fbihome.de>
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-24 21:05:58 +01:00
Stephan Bergmann
8eb8d64fa1 Don't count terminating newline when determining line length
Change-Id: I3a5d306f32697e160f008e73de38fc53f2f1dbda
Reviewed-on: https://gerrit.libreoffice.org/84349
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-03 20:21:33 +01:00
Miklos Vajna
058c54d540 git-hooks: show length of first line if it's too long
Change-Id: I164e4308c2a3e685bbc83cfde1cae5189839075e
Reviewed-on: https://gerrit.libreoffice.org/73556
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2019-06-05 21:34:15 +02:00
Stephan Bergmann
6cd9bc8aa4 Remove unhelpful "Check for whitespace in front of *'s" from .git-hooks
It was added with 60f200caa4 "git-hooks: Copy them
from the build repo", but I don't see its purpose, and it caused trouble for me
now when trying to commit <https://gerrit.libreoffice.org/67672> "Merge in
Flatpak improvements".

Change-Id: I922b5be87549793466f99db8b12be6081e683292
Reviewed-on: https://gerrit.libreoffice.org/67674
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-13 10:24:26 +01:00
Jan Holesovsky
eea439b4b1 git hooks: Tell what to do in another problematic submodules case.
Change-Id: I6247df16c021c13c97471cae16d3a1c0f3ddc691
2018-11-22 11:53:07 +01:00
Jan Holesovsky
e1f067151f git hooks: Check that you are not committing to submodules by accident.
And also for a dangerous setting in the configuration that hides the
changes from you.

Change-Id: I99bad8024baf7048696d9602e857c253c20cb5c2
Reviewed-on: https://gerrit.libreoffice.org/63389
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-11-22 11:25:10 +01:00
Thorsten Behrens
9d11ab9295 Add Python files to pre-commit hook checks
Change-Id: Ie5a631abe25a25bab9e74b353994f0788fe3dd06
Reviewed-on: https://gerrit.libreoffice.org/61279
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-10-03 10:39:39 +02:00
Tor Lillqvist
a0b34f97ef Restore .git-hooks/commit-msg accidentally removed earlier
(Removed in a06954bf5b100c9433b4e1dbcdcf8ab2df2763a1.)

Change-Id: Ieec84ecb9863c490786e4c195b8e6a838c0712a0
Reviewed-on: https://gerrit.libreoffice.org/54662
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-05-22 11:48:59 +02:00
Rizal Muttaqin
a06954bf5b tdf#117342 - Add Karasa Jaga to LibreOffice core
Change-Id: Id121df0ddc763a299c5714cadd0d61740876e3d6
Reviewed-on: https://gerrit.libreoffice.org/54512
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-05-22 10:38:59 +02:00
Miklos Vajna
5f5f093754 clang-format: improve error message when CI fails
Don't just tell the problem but hint how to fix it.

Change-Id: I9d079ee7d4ed61266e22a3fa21efe10366724645
Reviewed-on: https://gerrit.libreoffice.org/49471
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-02-09 13:06:17 +01:00
Miklos Vajna
0623f3a8f5 git pre-commit hook: catch copy&pasted author identity
git log --author="Your"

confirms that this happens in practice.

Change-Id: I48633bc9154ebc66fc022938831057bdc3ff76b3
Reviewed-on: https://gerrit.libreoffice.org/47892
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-01-15 11:08:26 +01:00
Miklos Vajna
653b513181 clang-format: restore lost warning on touching formatted file without check
Consistently only assign something to $clang_format if it's a good
version, and also consistently return undef if we found no good version.

Change-Id: Iadbbb56a5c15dfaeec5c80e3cc8fcc78b787c04b
Reviewed-on: https://gerrit.libreoffice.org/46489
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-12-15 09:02:17 +01:00
Miklos Vajna
2e4ecd03d6 clang-format: ignore not staged hunks
09:28 <@sberg> vmiklos, I think I ran into a scenario last night where I had
both `git add`-ed and non-added changes in a non-blacklisted file, and the
non-added changes violated clang-format (and the added ones did not), and the
commit hook complained

So make sure we validate the index version, not the filesystem one.

(And modify a formatted file to trigger CI validation of the hook change
itself.)

Change-Id: I6431b35ac50dd03741104b5709c5195d6ff28632
Reviewed-on: https://gerrit.libreoffice.org/46368
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-12-13 13:44:23 +01:00
Miklos Vajna
46ab76a709 git-hooks: fix pre-commit in submodules
translations.git failed with "Can't locate ClangFormat.pm in @INC (you
may need to install the ClangFormat module)".

Change-Id: Ibbe051c1cb4c1200da58821589b8271434b1f9a6
Reviewed-on: https://gerrit.libreoffice.org/45020
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-11-21 11:16:11 +01:00
Miklos Vajna
13de75274b clang-format: enforce coding style via Jenkins
- factor out common code to a shared module, and quote path to the
  clang-format binary, just in case.
- add a new check-last-commit script that is the CI equivalent of the
  exiting git pre-commit hook, but this one handles lack of clang-format
  as an error, not as a warning.
- $LODE_HOME/opt/bin is supposed to be in PATH already, so not
  mentioning LODE_HOME in ClangFormat::find() explicitly.
- if both COMPILER_PLUGINS and LODE_HOME is set, invoke
  solenv/clang-format/check-last-commit as part of 'make check'

To test these changes as part of CI, fix a single style violation in an
already committed, non-blacklisted file.

This depends on the lode.git commit
496123bcae28e06c6d6aeda39a5afd1e1fb1fd98 (utils_Linux: install
clang-format in the Jenkins case, 2017-11-16), otherwise erroring out on
a not installed clang-format as part of the build would be a problem.

Change-Id: Ib3110826194ff78a7f1bed1c3796147e92ccb3ba
Reviewed-on: https://gerrit.libreoffice.org/44939
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-20 13:41:40 +01:00
Miklos Vajna
ea5339e31c git-hooks: mention download link for clang-format when warning about it
Change-Id: I99f2154bb3d15fe4a99c1d27ca20756e1fb31cec
Reviewed-on: https://gerrit.libreoffice.org/44810
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-16 20:24:46 +01:00
Stephan Bergmann
c74f6d3c64 Warn when commit touches new files, but no suitable clang-format is found
Change-Id: Ifd254c30b8aecf6e7aec00bbfc8522a91bfa0909
2017-11-16 09:53:33 +01:00
Stephan Bergmann
e61a1b8dd8 First look for clang-format in CLANG_FORMT env var
Change-Id: I5de5c6f3e8be1d40c03cbddb9d2f4414b9a5791b
2017-11-13 11:59:08 +01:00
Miklos Vajna
53e13b256f clang-format: standardize on 5.0.0
Restrict the git hook further to only enforce style in case the found
clang-format binary's version matches to avoid output differences with
different clang-format version.

While at it, move the blacklist reading after the version check to speed
up committing a bit when no local enforcement happens.

Also add a simple script to list formatted files, since the blacklist is
large enough that doing it naively from the shell is too slow.

Change-Id: I0bc05961d262cc6bc91c6efdd1b91994ecfc6940
Reviewed-on: https://gerrit.libreoffice.org/44662
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-11-13 10:43:39 +01:00
Miklos Vajna
98f5f4d39c Enforce coding style with clang-format for new code
- The actual blacklist has to be generated with
  solenv/clang-format/generate-style-blacklist.sh in a separate commit.

- .clang-format is from
  <https://lists.freedesktop.org/archives/libreoffice/2014-August/062802.html>,
  except:

  - the commented out lines are removed
  - Standard is Cpp11 instead of Cpp03
  - explicitly avoid sorting includes (requested during ESC meeting
    2017-10-11)
  - no indentation inside namespaces (lots of existing code in sc wants this)

- The git hooks prints a diff when the style is violated, along with a
  command to fix up the violation automatically. It also enforces style
  only in new files and ignores all files listed in the blacklist.

- To avoid introducing one more hard-to-setup build dependency for new
  developers, help them two ways:

  - if clang-format is not installed, provide pre-built binaries for
    Linux/Windows/macOS

  - download/install of these binaries are printed as cmdline
    instructions, similar to how we have our own 'make' on Windows

- As per ESC call 2017-11-02, currently don't do any checks if
  clang-format is not installed (as a first step).

Change-Id: Iaa139c396337e8734aa1853305d808438260c41a
Reviewed-on: https://gerrit.libreoffice.org/43736
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-03 09:29:11 +01:00
Michael Stahl
236b7e19bb git-hooks: don't complain about large .ui files
Looks legit.

Change-Id: I73562d0a8d863868ae717cee97b6497a93df4ee4
2017-10-30 10:51:32 +01:00
Samuel Mehrbrodt
ecdf8f2803 pre-commit-hook: Also check xsl files for whitespace and tabs
Change-Id: Ibc1520735ab20787496564e8561a6bb5920a5538
Reviewed-on: https://gerrit.libreoffice.org/42280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-20 16:12:11 +02:00
Caolán McNamara
354d460af2 insist in a domain in .ui files
and just check .ui files for those .ui-specific patterns

Change-Id: If7b9c8779f7592db5b22ab96058dd85666ca9bdf
Reviewed-on: https://gerrit.libreoffice.org/42160
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-11 15:01:41 +02:00
Caolán McNamara
3fa79c0fa5 disallow .ui translatable entries without context at checkin
Change-Id: Iece6ae3c4eabad4cd113f469495d2c42833a7b92
Reviewed-on: https://gerrit.libreoffice.org/42157
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-11 12:56:12 +02:00