Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixed use of tabs and spaces #3

Open
cappe987 opened this issue Dec 13, 2021 · 1 comment
Open

Mixed use of tabs and spaces #3

cappe987 opened this issue Dec 13, 2021 · 1 comment

Comments

@cappe987
Copy link
Contributor

Tabs and spaces are mixed throughout the code. Looks like you are using 4 spaces to correspond to a half tab (8 space tabs). For example this while-loop https://github.com/westermo/brist/blob/main/lib.sh#L127.
The loop is indented with 4 spaces. Next line is 1 tab (8 spaces). Next line is 1 tab + 4 spaces. And next line is 2 tabs.

This does not feel like a good way to handle indentation.

@wkz
Copy link
Contributor

wkz commented Dec 13, 2021

My approach to whitespace is pretty simple:

  1. Press Tab key
  2. Trust emacs(1) to do the Right Thing™

I'll admit that mixing spaces and hard tabs is a bit weird, then again it seems to be the default behavior in at least one editor. We could change it I suppose - but to be honest, it is very low on the priority list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants