#5834·OpenBLAS

Mixture of tabs and spaces can make reading code difficult in some configurations (e.g. browsing on GitHub)

Author: itamarstCreated Jun 11, 2026Updated Jun 12, 2026

Consider how this code, which mixes tabs and spaces for indentation, is displayed by GitHub: https://github.com/OpenMathLib/OpenBLAS/blob/a033631ee8486c245967465c2b43b0a3eb9a1b61/driver/others/blas_server_omp.c#L354-L357

The nesting is confusing; whoever edited that file had tabs set to 8 spaces, but GitHub's embedded display is using a different number of spaces per tab.

And if you click through, indentation looks different, though still confusing! Seems like GitHub uses inconsistent spaces per tab across different parts of its code rendering:

Image

I fixed it locally with a .editorconfig file, which it's at least possible GitHub's code browser supports, and in general has wide-spread editor support:

ini
[*.{c,h}]
tab_width = 8

I don't know if that setting is correct for all files though.

Another option is to standardize on either tabs or spaces and reformat the code to match.