Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
9 changes: 6 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ This project follows Google coding conventions, with a few changes that are most
configuration files at the top level of the source tree and in `dev_tools/conf/`. The following
files configure various tools to the project conventions:

* `dev_tools/conf/.pylintrc`: Python code

* `.editorconfig`: basic code editor configuration

* `.hadolint.yaml`: Dockerfiles
Expand All @@ -84,6 +82,10 @@ files configure various tools to the project conventions:

* `.markdownlintrc`: Markdown files

* `.pylintrc`: Python file lint

* `.pyproject.toml`: Python tools other than Pylint

* `.yamllint.yaml`: YAML files

#### Code comment conventions
Expand Down Expand Up @@ -220,7 +222,8 @@ check/mypy
### Linting and formatting

Code should meet common style standards for Python and be free of error-prone constructs. We use
[Pylint](https://www.pylint.org/) to check for code lint and [Black](https://github.com/psf/black) for formatting code.
[Pylint](https://www.pylint.org/) to check for code lint and [Black](https://github.com/psf/black)
for formatting code.

* To check that code is formatted properly after editing Python files:

Expand Down
4 changes: 2 additions & 2 deletions check/pylint
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.

################################################################################
# Runs pylint on the repository using a preconfigured .pylintrc file.
# Runs pylint from the top level of the project.
#
# Usage:
# check/pylint [--flags]
Expand All @@ -24,4 +24,4 @@
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" || exit 1
cd "$(git rev-parse --show-toplevel)" || exit 1

pylint --rcfile=dev_tools/conf/.pylintrc "$@" src dev_tools
pylint "$@" src dev_tools
4 changes: 2 additions & 2 deletions check/pylint-changed-files
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Summary: run pylint on changed files using a preconfigured .pylintrc file.
# Summary: run pylint on changed files from the top level of the project.
#
# Usage:
# check/pylint-changed-files [BASE_REVISION]
Expand Down Expand Up @@ -81,4 +81,4 @@ echo "Found ${num_changed} lintable files associated with changes." >&2
if [ "${num_changed}" -eq 0 ]; then
exit 0
fi
env PYTHONPATH=dev_tools pylint --jobs=0 --rcfile=dev_tools/conf/.pylintrc "${changed[@]}"
env PYTHONPATH=dev_tools pylint --jobs=0 "${changed[@]}"