<feed xmlns='http://www.w3.org/2005/Atom'>
<title>extra-cmake-modules.git/kde-modules/kde-git-commit-hooks, branch v5.93.0-rc1</title>
<subtitle>hurd extra-cmake-modules.git</subtitle>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/'/>
<entry>
<title>Fix clang-format git hook script</title>
<updated>2022-03-21T11:07:36+00:00</updated>
<author>
<name>Ahmad Samir</name>
<email>a.samirh78@gmail.com</email>
</author>
<published>2022-03-18T13:40:59+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=da4ab76d01012f74d91d59b59c3366f3654a5b33'/>
<id>da4ab76d01012f74d91d59b59c3366f3654a5b33</id>
<content type='text'>
It should be --extensions "cpp,h,hpp,c"; previously, I naively tested that
it didn't bother .json files, but I not if it'll actually trigger for e.g.
a .h file...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It should be --extensions "cpp,h,hpp,c"; previously, I naively tested that
it didn't bother .json files, but I not if it'll actually trigger for e.g.
a .h file...
</pre>
</div>
</content>
</entry>
<entry>
<title>KDEClangFormat: se the same source file extensions in clang-format script and target</title>
<updated>2022-03-17T10:57:00+00:00</updated>
<author>
<name>Ahmad Samir</name>
<email>a.samirh78@gmail.com</email>
</author>
<published>2022-03-17T10:57:00+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=7cb3191ccb1dc24ff21a9e41ec30d52f420c98e6'/>
<id>7cb3191ccb1dc24ff21a9e41ec30d52f420c98e6</id>
<content type='text'>
Previously the clang-format.sh git hook script didn't specify the file
extensions to format; however it looks like with recent(?) clang-format
versions 'git clang-format' will consider .json files if such files were
changed by a commit, which makes the script fail, see:
https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/254

Sepcify the file extensions by passing --extensions to 'git clang-format'
command.

Also add ".hpp" to the file extensions we format, and use the same list of
file extensions everywhere.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously the clang-format.sh git hook script didn't specify the file
extensions to format; however it looks like with recent(?) clang-format
versions 'git clang-format' will consider .json files if such files were
changed by a commit, which makes the script fail, see:
https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/254

Sepcify the file extensions by passing --extensions to 'git clang-format'
command.

Also add ".hpp" to the file extensions we format, and use the same list of
file extensions everywhere.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make pre-commit hook executable</title>
<updated>2021-06-29T07:30:50+00:00</updated>
<author>
<name>Milian Wolff</name>
<email>mail@milianw.de</email>
</author>
<published>2021-06-29T07:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=58731b095951079497acf102f8b7630e97fc2028'/>
<id>58731b095951079497acf102f8b7630e97fc2028</id>
<content type='text'>
Otherwise recent versions of git will complain with:
```
hint: The '.git/hooks/pre-commit' hook was ignored because it's not set as executable.
hint: You can disable this warning with `git config advice.ignoredHook false`.
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise recent versions of git will complain with:
```
hint: The '.git/hooks/pre-commit' hook was ignored because it's not set as executable.
hint: You can disable this warning with `git config advice.ignoredHook false`.
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Provide fallback error when no .clang-format file is present</title>
<updated>2021-05-27T14:37:24+00:00</updated>
<author>
<name>Andreas Cord-Landwehr</name>
<email>cordlandwehr@kde.org</email>
</author>
<published>2021-05-27T14:37:24+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=07854bb9f0ac1ad5b5fad757395e04824c3fe9f3'/>
<id>07854bb9f0ac1ad5b5fad757395e04824c3fe9f3</id>
<content type='text'>
This check fixes a probably rare case, where we land in a repository
that contains this clang-format.sh hook but where the format file went
missing. In such cases, clang-format falls back to the system defaults,
which brings undesired defaults, e.g. enforced line breaks in comments
after 90 chars, which cannot easily be reverted by a reformat.

Since clang-format's --fallback-style=none option is not available for
git clang-format, this comment reimplements the logic.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This check fixes a probably rare case, where we land in a repository
that contains this clang-format.sh hook but where the format file went
missing. In such cases, clang-format falls back to the system defaults,
which brings undesired defaults, e.g. enforced line breaks in comments
after 90 chars, which cannot easily be reverted by a reformat.

Since clang-format's --fallback-style=none option is not available for
git clang-format, this comment reimplements the logic.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add cmake function to configure git pre-commit hooks</title>
<updated>2021-01-16T08:50:13+00:00</updated>
<author>
<name>Alexander Lohnau</name>
<email>alexander.lohnau@gmx.de</email>
</author>
<published>2021-01-11T19:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=45edd1b17051def13c157cba3b01fac53364149c'/>
<id>45edd1b17051def13c157cba3b01fac53364149c</id>
<content type='text'>
This will allow us to force QS checks before
the developer commits a change. Currently only
clang-format is supported, but as on #plasma and
https://phabricator.kde.org/T11214 discussed we
might want to add different formatters.

By making the checks configurable we are flexible
and can easily extend it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will allow us to force QS checks before
the developer commits a change. Currently only
clang-format is supported, but as on #plasma and
https://phabricator.kde.org/T11214 discussed we
might want to add different formatters.

By making the checks configurable we are flexible
and can easily extend it.
</pre>
</div>
</content>
</entry>
</feed>
