Quantcast
Channel: Active questions tagged code-formatting - Meta Stack Overflow
Viewing all articles
Browse latest Browse all 180

Tabs are discouraged. Should we use them anyway in answers about make where they are meaningful? [duplicate]

$
0
0

For better formatting tabs are discouraged in questions and answers. See, for example, the How to create a Minimal, Reproducible Example section of the help:

Also, use spaces instead of tabs – tabs might not get correctly formatted on Stack Overflow.

However tabs are meaningful in Makefiles where they cannot be replaced by spaces. When answering a make question and suggesting some make code, I always comply with the no-tabs recommendation and replace them by 4 spaces. It frequently happens that the OP copy-paste the suggested code and post a comment indicating that it doesn't work:

Makefile:NN: *** missing separator.  Stop.

What shall I do? Ignore the no-tabs recommendation in make code snippets or always explain that, after copy-pasting, the leading spaces in recipes shall be replaced by tabs?


Viewing all articles
Browse latest Browse all 180

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>