OpenMathLib / OpenMathLib/OpenBLAS
Mixture of tabs and spaces can make reading code difficult in some configurations (e.g. browsing on GitHub)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 7.6k
- Forks
- 1.7k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 42
Description
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:
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:
[*.{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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with driver/others/blas_server_omp.c around lines 354-357 and inspect the repository's existing C and header indentation conventions. Evaluate whether an .editorconfig setting or a consistent tab/space policy fits the files involved; done means the affected code renders with unambiguous nesting and the chosen convention is documented or applied consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100