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

workspace rustfmt #483

Merged
merged 9 commits into from
Feb 11, 2023
Merged

workspace rustfmt #483

merged 9 commits into from
Feb 11, 2023

Conversation

jquesada2016
Copy link
Contributor

I am commiting my personal preferred settings, but these should in no means be what the project actually uses, just a potential starting point. I also have not applied the rules, as this would be a full project-wide recommit.

@jquesada2016
Copy link
Contributor Author

Whoaps, I see this brought in the changes from another branch. This is because I accidentally branched not off main. Let me force push to fix this

@gbj
Copy link
Collaborator

gbj commented Feb 8, 2023

This is fine by me, except I'd prefer either the default tab_spaces = 4 or, possibly better, hard_tabs = true so you can set tab width in your editor to 2 and others can set to 4 (but this would involve changing every line in the project once)

@jquesada2016
Copy link
Contributor Author

If you check out the config file, it is actually using the default tab size of 4. I wouldn't worry about the spaces vs tabs thing because I saw that VS code is able to figure it out on it's own, so I think it should be fine.

The thing of not would be to comb through the bevy of rustfmt settings and see if there's anything we like. For example, I didn't know format_docs existed, and I can't go back after it! There may be more settings like this hiding around that may benefit the code aesthetics of the project. I also think it'd be a good idea to change these settings as little as possible for the same reason you mentioned, each change will potentially change ALL files in the repo.

Another slightly related thing...we're using cfg_if quite a bit....and it makes code look really out of place because it doesn't format anything inside :(

@gbj
Copy link
Collaborator

gbj commented Feb 8, 2023

If you check out the config file, it is actually using the default tab size of 4. I wouldn't worry about the spaces vs tabs thing because I saw that VS code is able to figure it out on it's own, so I think it should be fine.

tab_spaces = 2

?

I may be misunderstanding.

@jquesada2016
Copy link
Contributor Author

Hmm...on my commit, that line isn't there?

@gbj
Copy link
Collaborator

gbj commented Feb 8, 2023

Hmm...on my commit, that line isn't there?

I don't what to tell you... Are we looking at the same branch? This PR has one commit and here's the diff

image

@jquesada2016
Copy link
Contributor Author

We were on the same branch, but not the same commit. I forced it again...idk what happened that caused this upstream PR to be diferent from my local one.

@gbj gbj marked this pull request as ready for review February 11, 2023 19:25
@gbj gbj merged commit d4648da into leptos-rs:main Feb 11, 2023
gbj pushed a commit that referenced this pull request Feb 12, 2023
gbj pushed a commit that referenced this pull request Mar 21, 2023
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 this pull request may close these issues.

None yet

2 participants