git-hook: Catch tab indentation also for makefiles

classic Classic list List threaded Threaded
6 messages Options
Tamas Zolnai Tamas Zolnai
Reply | Threaded
Open this post in threaded view
|

git-hook: Catch tab indentation also for makefiles

Hi there,

I just noticed that for makefiles (*.mk) git does not check whether the commit contains tab indentation. As I know we use spaces also for makefiles for indentation, right? So I added a patch changing pre-commit hook to check tab also for makfiles:
https://gerrit.libreoffice.org/#/c/41897/
I hope it's ok. I don't know who used to care of git stuff.

Thanks,
Tamás

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: git-hook: Catch tab indentation also for makefiles

On 09/04/2017 03:30 PM, Tamas Zolnai wrote:
> I just noticed that for makefiles (*.mk) git does not check whether the commit contains tab indentation. As I know we use spaces also for makefiles for indentation, right? So I added a patch changing pre-commit hook to check tab also for makfiles:
> https://gerrit.libreoffice.org/#/c/41897/
> I hope it's ok. I don't know who used to care of git stuff.

I think temporary GNU make still needs recipe lines to start with tab
characters?  And in any case, our makefiles are apparently written with
lots of tab characters all over the place.  I'd suggest to revert (at
least for now).
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Zolnai Tamás Zolnai Tamás
Reply | Threaded
Open this post in threaded view
|

Re: git-hook: Catch tab indentation also for makefiles



2017-09-04 15:43 GMT+02:00 Stephan Bergmann <[hidden email]>:
On 09/04/2017 03:30 PM, Tamas Zolnai wrote:
I just noticed that for makefiles (*.mk) git does not check whether the commit contains tab indentation. As I know we use spaces also for makefiles for indentation, right? So I added a patch changing pre-commit hook to check tab also for makfiles:
https://gerrit.libreoffice.org/#/c/41897/
I hope it's ok. I don't know who used to care of git stuff.

I think temporary GNU make still needs recipe lines to start with tab characters?  And in any case, our makefiles are apparently written with lots of tab characters all over the place.  I'd suggest to revert (at least for now).

Yeah, I see that tabs and spaces are mixed in makefiles. That's why I thought it would be good to make it consistent similar to other source files.
I did not push it yet. It's on gerrit. So I can abandon it.


_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
jani libreoffice jani libreoffice
Reply | Threaded
Open this post in threaded view
|

Re: git-hook: Catch tab indentation also for makefiles


I think temporary GNU make still needs recipe lines to start with tab characters?  And in any case, our makefiles are apparently written with lots of tab characters all over the place.  I'd suggest to revert (at least for now).

Yeah, I see that tabs and spaces are mixed in makefiles. That's why I thought it would be good to make it consistent similar to other source files.
I did not push it yet. It's on gerrit. So I can abandon it.

build breaks on my mac when I replace tab with spaces, so please do not make this a demand.

rgds
jan o

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Zolnai Tamás Zolnai Tamás
Reply | Threaded
Open this post in threaded view
|

Re: git-hook: Catch tab indentation also for makefiles


2017-09-04 17:13 GMT+02:00 jani libreoffice <[hidden email]>:

I think temporary GNU make still needs recipe lines to start with tab characters?  And in any case, our makefiles are apparently written with lots of tab characters all over the place.  I'd suggest to revert (at least for now).

Yeah, I see that tabs and spaces are mixed in makefiles. That's why I thought it would be good to make it consistent similar to other source files.
I did not push it yet. It's on gerrit. So I can abandon it.

build breaks on my mac when I replace tab with spaces, so please do not make this a demand.

OK, I abandoned the patch. Thanks! 


_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Bjoern Michaelsen-3 Bjoern Michaelsen-3
Reply | Threaded
Open this post in threaded view
|

Re: git-hook: Catch tab indentation also for makefiles

In reply to this post by Tamas Zolnai
Hi,

On Mon, Sep 04, 2017 at 02:30:06PM +0100, Tamas Zolnai wrote:
> I just noticed that for makefiles (*.mk) git does not check whether the
> commit contains tab indentation. As I know we use spaces also for makefiles
> for indentation, right? So I added a patch changing pre-commit hook to check
> tab also for makfiles: https://gerrit.libreoffice.org/#/c/41897/ I hope it's
> ok. I don't know who used to care of git stuff.

Late to this show, but yeah:

GNU make still requires tabs for its rules/recipe syntax etc.

That we get away with spaces is only because gbuild widely is macro calls with
whitespace separated lists as arguments. And for those, tabs-vs-space doesnt
matter.

Best,

Bjoern
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice