New issue
Advanced search Search tips

Issue 864685 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Pylint analyzer: allow project-specific warning configuration

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

Issue description

In general, different projects will want different linter warnings enabled.

For some linters, the way to do this will be to look a config file in the directory for files being checked, since that might be a convenient way for people to configure it.

Another way would be to specify a path to a config file, or specify particular warnings to enable/disable in the Tricium project config.

Related brainstorm doc: https://docs.google.com/document/d/1_-IDGQ_3_MRD3hrrzeNG8jQnQL563_1aUNUfrbja-bo/edit
 
Cc: juliehockett@google.com
Configs in project selections for analyzers can add args to analyzer invocations:

https://chromium.googlesource.com/infra/infra/+/master/go/src/infra/tricium/appengine/common/config/generate.go#202

We could make the Pylint analyzer take args to enable/disable warnings, or specify a pylintrc file; the args would be passed on to the actual pylint invocation.
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 27

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/cde7e19116e6b4594695b9c0771b607ea1aab5b7

commit cde7e19116e6b4594695b9c0771b607ea1aab5b7
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Thu Sep 27 18:32:54 2018

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 27

Labels: merge-merged-config
The following revision refers to this bug:
  https://chromium.googlesource.com/playground/gerrit-tricium/+/a0c4e829367387a7c02453dce0323441cad5b09d

commit a0c4e829367387a7c02453dce0323441cad5b09d
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Thu Sep 27 18:49:29 2018

[tricium] Try adding configs to playground config

This is an experiment, just to see if this works as-is now.

Bug:  864685 
Change-Id: I7f4638bfd4058e9f2f7eb804133b3e1fd1864862
[modify] https://crrev.com/a0c4e829367387a7c02453dce0323441cad5b09d/tricium-dev.cfg

Project Member

Comment 4 by bugdroid1@chromium.org, Sep 27

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

commit 292deba00989e3b866b4a9c906a57bf67409e37b
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Thu Sep 27 23:42:28 2018

[tricium pylint] Change enable/disable flag behavior

Background: The overall plan for configuration of checks in Pylint is
that eventually we probably want to generally use project-specific
pylintrc files for most projects; but it might be nice to support
an alternate simpler way to configure checks for a project, by
listing checks to enable in the config.

Most of the time I imagine that we would either want to just use
the default checks but disable a few specific checks, or make a
whitelist of checks to enable. This would make it so that the way
to do the former would be to just specify "disable", and the way
to do the latter would be to set disable to something general
like "all" or "W" and set enable to a specific list.

Bug:  864685 
Change-Id: I57b0ac4439e13a5d0a0a809cbabe0fb4e97179d2
Reviewed-on: https://chromium-review.googlesource.com/1249955
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#17932}
[modify] https://crrev.com/292deba00989e3b866b4a9c906a57bf67409e37b/go/src/infra/tricium/functions/pylint/pylint_parser.go

Owner: qyears...@chromium.org
Status: Started (was: Available)
Flag now behaves as I expected: https://chromium-review.googlesource.com/c/playground/gerrit-tricium/+/1249364
Status: Fixed (was: Started)

Sign in to add a comment