Skip to content

Commit 46ced00

Browse files
author
Jon Wayne Parrott
authored
Add back pylint as info-only for core (#3515)
1 parent 013949f commit 46ced00

File tree

3 files changed

+37
-6
lines changed

3 files changed

+37
-6
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ coverage.xml
5656
system_tests/local_test_setup
5757

5858
# Make sure a generated file isn't accidentally committed.
59-
scripts/pylintrc_reduced
59+
pylintrc
60+
pylintrc.test
6061

6162
# Directories used for creating generated PB2 files
6263
generated_python/

core/nox.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
from __future__ import absolute_import
1616

17-
import os
18-
1917
import nox
2018

2119

@@ -43,15 +41,22 @@ def unit_tests(session, python_version):
4341

4442
@nox.session
4543
def lint(session):
46-
"""Run flake8.
44+
"""Run linters.
4745
48-
Returns a failure if flake8 finds linting errors or sufficiently
46+
Returns a failure if the linters find linting errors or sufficiently
4947
serious code quality issues.
5048
"""
5149
session.interpreter = 'python3.6'
52-
session.install('flake8')
50+
session.install('flake8', 'pylint', 'gcp-devrel-py-tools')
5351
session.install('.')
5452
session.run('flake8', 'google/cloud/core')
53+
session.run(
54+
'gcp-devrel-py-tools', 'run-pylint',
55+
'--config', 'pylint.config.py',
56+
'--library-filesets', 'google',
57+
'--test-filesets', 'tests',
58+
# Temporarily allow this to fail.
59+
success_codes=range(0, 100))
5560

5661

5762
@nox.session

core/pylint.config.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2017 Google Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This module is used to configure gcp-devrel-py-tools run-pylint."""
16+
17+
# Library configuration
18+
19+
# library_additions = {}
20+
# library_replacements = {}
21+
22+
# Test configuration
23+
24+
# test_additions = copy.deepcopy(library_additions)
25+
# test_replacements = copy.deepcopy(library_replacements)

0 commit comments

Comments
 (0)