git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/4] test: Add target test-lint-shell-syntax

From
Torsten Bögershausen <tboegi@web.de>
Date
Jan 8, 2013, 04:11 UTC
Message-ID
<50EB9C6B.6080802@web.de>
In-Reply-To
<7vwqvoj293.fsf@alter.siamese.dyndns.org>
On 07.01.13 19:07, Junio C Hamano wrote:
Show 38 quoted lines
> Torsten Bögershausen <tboegi@web.de> writes:
> 
>> Sorry for late answer, but there is a problem (both linux and Mac OS X) :-(
>> $ make test-lint does not do shel syntax check, neither
>> $ make test-lint-shell-syntax
> 
> In which directory?
> 
>     $ make -C t test-lint-shell-syntax
>     ... passes silently ...
>     $ ed t/t0000-basic.sh
>     /test_expect_success/
>     a
>             which sh
>     .
>     w
>     q
>     $ make -C t test-lint-shell-syntax
>     t0000-basic.sh:28: error: which is not portable (please use type):      which sh
>     make: *** [test-lint-shell-syntax] Error 1
> 
> If you edit out '@' (but nothing else) from this line:
> 
>> 	@'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T)
> 
> and run the above again, you would see that it is running this shell
> command:
> 
> '/usr/bin/perl' check-non-portable-shell.pl t0000-basic.sh t0001-init.sh ...
> 
> If you introduce a Perl syntax error to check-non-portable-shell.pl,
> like this, you will get:
> 
>     $ make -C t test-lint-shell-syntax
>     syntax error at check-non-portable-shell.pl line 11, near "whoa
> 
> So... is your shell broken?  The above seems to work for dash, bash,
> ksh and zsh.
Thanks for helping me out, and sorry for the noise.
My brain "went off track" while chasing a failure of t7400 on pu under Mac OS :-(
Previous: Junio C Hamano
Message 18 of 18 in “test: Add target test-lint-shell-syntax”
  1. 1/4 test: Add target test-lint-shell-syntaxTorsten Bögershausen, Jan 1, 2013
  2. Junio C HamanoJan 1, 2013
  3. Torsten BögershausenJan 2, 2013
  4. Junio C HamanoJan 2, 2013
  5. Jeff KingJan 2, 2013
  6. Junio C HamanoJan 2, 2013
  7. Torsten BögershausenJan 2, 2013
  8. Jeff KingJan 2, 2013
  9. Torsten BögershausenJan 2, 2013
  10. Junio C HamanoJan 3, 2013
  11. Torsten BögershausenJan 3, 2013
  12. Junio C HamanoJan 3, 2013
  13. tests: turn on test-lint by defaultJeff King, Jan 3, 2013
  14. Junio C HamanoJan 3, 2013
  15. Junio C HamanoJan 3, 2013
  16. Torsten BögershausenJan 7, 2013
  17. Junio C HamanoJan 7, 2013
  18. Torsten BögershausenJan 8, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.