Skip to content

Commit

Permalink
Move flake8 to ci_lint (apache#8652)
Browse files Browse the repository at this point in the history
* Move flake8 to ci_lint

This fixes the scenario where you lint with ci_lint but it can still
fail in PR due to flake8 being injected only into the Mac build.

* Disable flake8 until the docker changes have landed
  • Loading branch information
Mousius authored and ylc committed Sep 29, 2021
1 parent 07535b8 commit 4d470f5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker/Dockerfile.ci_lint
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN pip config set global.cache-dir false

RUN apt-get update && apt-get install -y doxygen graphviz

RUN pip3 install cpplint pylint==2.4.4 mypy==0.902 black==20.8b1
RUN pip3 install cpplint pylint==2.4.4 mypy==0.902 black==20.8b1 flake8==3.9.2

# java deps for rat
COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh
Expand Down
20 changes: 20 additions & 0 deletions tests/lint/flake8.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash -e
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Disabled until docker images are rebuilt
# python3 -m flake8 . --count --select=E9,F63,F7 --show-source --statistics
1 change: 1 addition & 0 deletions tests/scripts/task_lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ tests/lint/python_format.sh

echo "Linting the Python code..."
tests/lint/pylint.sh
tests/lint/flake8.sh

echo "Lintinf the JNI code..."
tests/lint/jnilint.sh
Expand Down

0 comments on commit 4d470f5

Please sign in to comment.