New issue
Advanced search Search tips

Issue 900131 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

tast-lint: Import checker misbehaves if there is any comment inside the import block

Project Member Reported by nya@chromium.org, Oct 30

Issue description

I saw this tast-lint error while uploading a CL:

src/chromiumos/tast/local/bundles/cros/main.go: Import should be grouped into standard packages, third-party packages and chromiumos packages in this order separated by empty lines.
Apply the following patch to fix:
@@ -9,7 +9,6 @@
 
 import (
        "os"
-
        // Underscore-imported packages register their tests via init functions.
        "chromiumos/tast/bundle"
        _ "chromiumos/tast/local/bundles/cros/arc"


The order is correct, so this is a false positive of the import checker.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast/+/0dc046a801a2cdfe1ac3578a08ececb1e417b346

commit 0dc046a801a2cdfe1ac3578a08ececb1e417b346
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Oct 31 15:17:31 2018

tast-lint: Disable import check if comments are involved.

BUG=chromium:900131
TEST=fast_build.sh -T
TEST=CL:1307177 can be uploaded.

Change-Id: I0d82f7087c61ffd5114d151d170e7e35200d7416
Reviewed-on: https://chromium-review.googlesource.com/1307197
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>

[modify] https://crrev.com/0dc046a801a2cdfe1ac3578a08ececb1e417b346/src/chromiumos/cmd/tast-lint/check/import_order.go
[modify] https://crrev.com/0dc046a801a2cdfe1ac3578a08ececb1e417b346/src/chromiumos/cmd/tast-lint/check/import_order_test.go

Status: Fixed (was: Assigned)
Status: Assigned (was: Fixed)
Workaround landed, but we'll want to keep this open for a fundamendal fix.

Sign in to add a comment