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鈥檒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

Open
3 tasks done
grivera64 opened this issue Apr 8, 2024 · 4 comments
Open
3 tasks done

Comments

@grivera64
Copy link
Contributor

grivera64 commented Apr 8, 2024

Maintenance Task Description

In the docs, there are some inconsistencies in indentation styles (e.g. \t, 2 spaces, 4 spaces, etc...).

For example:

For 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:

  • I have confirmed that this maintenance task is currently not being addressed.
  • I understand that this task will be evaluated by the maintainers and prioritized accordingly.
  • I am available to provide further information if needed.
@gaby
Copy link
Member

gaby commented Apr 9, 2024

I propose introducing the following actions in a new workflow:

@ReneWerner87 ReneWerner87 added this to the v3 milestone Apr 9, 2024
@ReneWerner87
Copy link
Member

I propose introducing the following actions in a new workflow:

good idea

@gaby
Copy link
Member

gaby commented Apr 9, 2024

I will give this a try tonight.

@grivera64
Copy link
Contributor Author

I propose introducing the following actions in a new workflow:

good idea

I agree, this sounds like a good way to automate markdown format review (especially in cases of 4-spaces vs \t renders the same in VS Code but not on the gofiber.io docs), as well as check other markdown-related formatting inconsistencies.

This will only bring two more things we need to address to add these to GitHub Actions:

  • What indentation format will we enforce? We can customize this in the config, or use default settings and enforce it from now on.
  • It also seems that we will need to also manually update the docs to comply with the linter rules, based on their GitHub repository (Please correct me if this assumption is wrong).

What do you all think about the above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants