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

Suggestion: use tabs instead of double spaces #1063

Open
3 of 5 tasks
Zbizu opened this issue Jan 21, 2025 · 2 comments
Open
3 of 5 tasks

Suggestion: use tabs instead of double spaces #1063

Zbizu opened this issue Jan 21, 2025 · 2 comments
Labels
Status: Pending Test This PR or Issue requires more testing Type: Enhancement New feature or request

Comments

@Zbizu
Copy link
Contributor

Zbizu commented Jan 21, 2025

Priority

Enhancement

Area

  • Data
  • Source
  • Docker
  • Other

What is missing?

reasons for this:

  • because we can
  • because the spaces look ugly
  • because it annoyed me one time too much

this will break backwards compatibility, but the migration is as easy as replacing "\s\s" with "\t" in the entire project

there is no reason for otui to have double spaces, in fact only two functions need adjustments for this to work, namely: otmlEmitter::emitNode and otmlparser::getLineDepth

Code of Conduct

  • I agree to follow this project's Code of Conduct
@github-actions github-actions bot added Status: Pending Test This PR or Issue requires more testing Type: Enhancement New feature or request labels Jan 21, 2025
@lucasoares
Copy link
Contributor

lucasoares commented Jan 30, 2025

I disagree with you. Double spaces have a few benefits with some editors. Spaces always render the same width, ensuring code looks identical regardless of the editor, terminal, or IDE settings. Many popular programming languages and style guides prefer spaces. There is also other advantages on git diff tools etc.

I also would go for the opposity direction: creeate a github action for linting both lua, c++ and ot* files to guarantee the same styling throughout the entire project.

Also we could create a linter to format ot* files to avoid other problems and even vscode plugin for linting, but keeping the spaces.

@luanluciano93
Copy link
Collaborator

I agree with you and would keep the TFS and canary standard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Test This PR or Issue requires more testing Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants