New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 863600 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 16
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Pylint left duplicate comments on an example CL

Project Member Reported by qyearsley@google.com, Jul 13

Issue description

In an example CL with both "example.py" and "example.txt", the Pylint analyzer produced twice as many comments as it should have.

CL: https://chromium-review.googlesource.com/c/playground/gerrit-tricium/+/1097599

By comparing patchsets 46, 47, 48, we can see that it produces the extra comments when there's another example.* file in the CL.

I think that this happens because Python ignores extensions when passed files and so `pylint example.py example.txt` resulted in running pylint on the "example" module twice.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 14

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

commit 17a5a6a7d8cff1912c0163a781e77dcdeaeb36e7
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Sat Jul 14 01:35:29 2018

[tricium] Extract helper function to filter files and use it in Pylint analyzer

This isn't quite as ideal as Tricium providing the filtered files for
the analyzer, but at least it makes it so it's less code duplicated
between different analyzers, since most analyzers will want to do some
filtering of the input file list.

Bug:  863600 , 863106
Change-Id: Iba82eb176535c6aa7e5465b9955f012bf2fdeee0
Reviewed-on: https://chromium-review.googlesource.com/1137212
Reviewed-by: Lann Martin <lannm@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>

[modify] https://crrev.com/17a5a6a7d8cff1912c0163a781e77dcdeaeb36e7/go/src/infra/tricium/api/v1/data_helpers.go
[modify] https://crrev.com/17a5a6a7d8cff1912c0163a781e77dcdeaeb36e7/go/src/infra/tricium/functions/pylint/pylint_parser.go
[modify] https://crrev.com/17a5a6a7d8cff1912c0163a781e77dcdeaeb36e7/go/src/infra/tricium/api/v1/data_helpers_test.go
[modify] https://crrev.com/17a5a6a7d8cff1912c0163a781e77dcdeaeb36e7/go/src/infra/tricium/functions/shellcheck/main.go

Status: Fixed (was: Assigned)

Sign in to add a comment