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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃Ч [Maintenance]: Update docs to use a consistent indentation style #2955
Comments
I propose introducing the following actions in a new workflow: |
good idea |
I will give this a try tonight. |
I agree, this sounds like a good way to automate markdown format review (especially in cases of 4-spaces vs This will only bring two more things we need to address to add these to GitHub Actions:
What do you all think about the above? |
Maintenance Task Description
In the docs, there are some inconsistencies in indentation styles (e.g.
\t
, 2 spaces, 4 spaces, etc...).For example:
rewrite
middleware uses 2-space tabssession
middleware uses 4-space tabsidempotency
middleware uses\t
tabsFor readability, this issue proposes to update the docs to use a consistent indentation style to avoid any potential formatting issues.
Impact on the Project
While the tabs versus
n
-spaces debate is very controversial, there are problems with inconsistent indentation within a project.For example, using inconsistent spacing in a single file cause code snippets to render in https://gofiber.io in an unaligned manner:
context
uses both 2-, 4-, and 8-space tabs within the same file.compress
middleware uses both 2- and 4-space tabs within the same file.There are also smaller issues that have been made due to this issue in the past. For example, #2866 fixes
key_auth.md
that used 8-space indentation alongside 4-space indentation.If GoFiber was to adopt an indentation standard, we can avoid most indentation inconsistencies issues within the docs in the future.
A potential risk would be that this may require a lot of refactoring work. This could be addressed in the long-term over several smaller issues, but this is largely a readability issue that is mostly prominent when two indentation styles are used in the same file. As long as individual files use a consistent tab style, this becomes less of an issue.
Additional Context (optional)
No response
Checklist:
The text was updated successfully, but these errors were encountered: