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

Change tab width for .go files to 4 #11455

Merged
merged 3 commits into from
May 17, 2020
Merged

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented May 17, 2020

I thing 8-wide tabs are kind of archaic and inconsistent with template files which already use 4-wide.

Also did some misc cleanups in the .editorconfig files.

I thing 8-wide tabs are kind of archaic and inconsisten with template
files which already use 4-wide.

Also did some misc cleanups in the .editorconfig files.
.editorconfig Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 17, 2020
@silverwind
Copy link
Member Author

silverwind commented May 17, 2020

gofmt hardcodes tab width to 8, so I'm not sure it's wise to change it because if gofmt outputs spaces those would be misaligned. Does anyone know if gofmt can output spaces for alignment in some cases or is it all tabs?

@silverwind
Copy link
Member Author

silverwind commented May 17, 2020

Based on golang/go@25b5181, I think it's fine we change this. It says tab width has no effect on alignment:

Since "columns of alignment" are terminated whenever indentation changes from one line to the next, alignment with spaces will work independent of the actually chosen tab width ...

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 17, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 17, 2020
@lafriks lafriks merged commit 97cabf3 into go-gitea:master May 17, 2020
@silverwind silverwind deleted the go-tab-4 branch May 17, 2020 20:42
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* Change tab width for .go files to 4

I thing 8-wide tabs are kind of archaic and inconsisten with template
files which already use 4-wide.

Also did some misc cleanups in the .editorconfig files.

* add css

Co-authored-by: Lauris BH <lauris@nix.lv>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants