New issue
Advanced search Search tips

Issue 897283 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 11
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Issue report for Spacey/SpaceMix: Tabs

Project Member Reported by iannu...@google.com, Oct 19

Issue description

https://tricium-dev.appspot.com/run/5086908480749568

I'm not exactly sure what this warning is about, but if I had to guess from the name it's unhappy that there are mixed spaces and tabs in the file? This is the standard formatting for go files (in fact, it would probably be worth running `go fmt` on .go files in place of Spacey).
 
Status: Available (was: Untriaged)
Summary: Issue report for Spacey/SpaceMix: Tabs (was: Issue report for Spacey/SpaceMix)
For some reason I looked at this bug multiple times without actually responding.

Anyway, yes, currently Spacey warns on tabs followed by spaces in Go code, which is incorrect.

One possible solution is:

 1. Add .go to the blacklist of extensions for checking mixed spaces. Makefiles are already there for a similar reason.
 2. Later, for Go code, it would be reasonable to add a go fmt analyzer (Julie from Fucshia already added one for Fuchsia...)

Another possible solutions are to change Spacey to:

 - Never check for tabs followed by spaces -- but for most files we really would like to warn for this
 - Specifically don't check for tabs followed by spaces for Go -- but this increases the complexity by adding more special cases.
Cc: -qyears...@chromium.org
Owner: qyears...@chromium.org
Status: Started (was: Available)
https://chromium-review.googlesource.com/c/infra/infra/+/1370546
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 11

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/b34d764a111da95471fd2a7147dedb4ea581724a

commit b34d764a111da95471fd2a7147dedb4ea581724a
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Tue Dec 11 17:51:49 2018

[tricium spacey] Don't check for tab/space mix in go files

Sometimes tabs followed by spaces is correct for Go.

Ideally Go code should always be formatted by go fmt,
so (1) style issues are usually not a problem, and
(2) if we were to add a style/format analyzer for Go
it could run go fmt like the one that Julie wrote for
Fuchsia.

Bug:  897283 
Change-Id: I2bd3a9ab84854e2c89eb03b242253843dcb6986d
Reviewed-on: https://chromium-review.googlesource.com/c/1370546
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19487}
[modify] https://crrev.com/b34d764a111da95471fd2a7147dedb4ea581724a/go/src/infra/tricium/functions/spacey/spacey.go

Status: Fixed (was: Started)
New version deployed

Sign in to add a comment