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

chore: add editorconfig file #1403

Merged
merged 1 commit into from
Nov 21, 2022
Merged

chore: add editorconfig file #1403

merged 1 commit into from
Nov 21, 2022

Conversation

LNSD
Copy link
Contributor

@LNSD LNSD commented Nov 20, 2022

This PR addresses a long-existing concern: trailing whitespaces.

  • Add .editorconfig file for editor configuration homogeneity. Configure to remove the trailing whitespaces automatically.

Every time a file is modified, the trailing whitespaces will be removed. This will allow us to follow an incremental approach toward a cleaner codebase.

@LNSD LNSD requested a review from jm-clius November 20, 2022 10:26
@LNSD LNSD self-assigned this Nov 20, 2022
@status-im-auto
Copy link
Collaborator

status-im-auto commented Nov 20, 2022

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
⁉️ b704130 #1 2022-11-20 10:31:04 ~4 min linux 📄log
⁉️ b704130 #1 2022-11-20 10:32:08 ~5 min macos 📄log

@alrevuelta
Copy link
Contributor

I assume this involves installing an extension and loading this config file? like "EditorConfig for VS Code"? Should we document this somewhere?

# Trailing spaces in markdown indicate word wrap
[{*.markdown,*.md}]
trim_trailing_spaces = false
max_line_length = 80
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the effect of this max_line_length? Will longer lines be auto-wrapped?

Copy link
Contributor Author

@LNSD LNSD Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is from the editorconfig's default values. I just copied it here, so we don't have any surprises with implicit configurations.

What is the effect of this max_line_length? Will longer lines be auto-wrapped?

VS code only supports a small subset of editorconfig parameters: https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig#supported-properties
So the answer is: no, it is not supported by the vscode/plugin; no effect.

@LNSD
Copy link
Contributor Author

LNSD commented Nov 21, 2022

I assume this involves installing an extension and loading this config file? like "EditorConfig for VS Code"? Should we document this somewhere?

I thought VS Code was already shipped with the editorconfig extension installed by default. Given that you are the one that joined most recently, and I am very busy with the Waku store investigation, @alrevuelta can you document it?

Copy link
Contributor

@jm-clius jm-clius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Happy with this, but I assume it's Visual Studio-specific? Since some contributors use other editors (e.g. vim), we can perhaps just provide them with style guidelines.

@LNSD
Copy link
Contributor Author

LNSD commented Nov 21, 2022

Thanks! Happy with this, but I assume it's Visual Studio-specific? Since some contributors use other editors (e.g. vim), we can perhaps just provide them with style guidelines.

In that case, they'll have to install the editorconfig support for their editor. For example, vim has an official plugin.

@LNSD LNSD merged commit 0c4fcdc into master Nov 21, 2022
@LNSD LNSD deleted the chore-add-editorconfig branch November 21, 2022 08:31
@alrevuelta
Copy link
Contributor

@LNSD Documented in our coding guidelines, miscellaneous section. Using VSCode I had to install that extension for it to work.

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

Successfully merging this pull request may close these issues.

4 participants