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

Please define a style guide for this repo #4

Closed
mbrukman opened this issue Aug 11, 2020 · 1 comment · Fixed by #6
Closed

Please define a style guide for this repo #4

mbrukman opened this issue Aug 11, 2020 · 1 comment · Fixed by #6

Comments

@mbrukman
Copy link
Contributor

I'm a bit confused as to the preferred style guide in this repo, e.g.,

  • library.py has 2-space indent
  • www/*.js appear to have 4-space indent but also have tabs
  • www/*.html also have tabs

I'm fine with 2-space indent everywhere, though traditional Python style guide is 4-space indent, but to each their own.

Once that's defined, we can fix existing files (presumably, we don't want a mix of spaces + tabs) and encode them into an EditorConfig file to make it automatic for everyone.

@epw
Copy link
Owner

epw commented Aug 11, 2020

Yeah, this is what comes of writing the files across three computers each with their own unique Emacs configurations.

Until now I haven't really worked with other programmers outside of a company setting, so haven't worried about it too much, and I've never heard of EditorConfig. I'm slightly wary of adding a second configuration language to my Emacs, but that's probably not too costly overall.

I think I'd say 2-space indent everywhere, I tend to find 4-space uses up too much horizontal space. I'll figure out what I need to change so that emacs stops adding tabs into HTML and JavaScript files.

mbrukman added a commit to mbrukman/find-libraries-for-books that referenced this issue Aug 11, 2020
* add a simple cross-editor config file to support 2-space indent on all files
* updated all files to use 2-space indent

Some improvements are possible, e.g., by specifying a 4-space continuation
indent, which EditorConfig doesn't appear to support (yet?)

Fixes epw#4
@epw epw closed this as completed in #6 Aug 12, 2020
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

Successfully merging a pull request may close this issue.

2 participants