Try github super linter (#614)

Add github super-linter to the CI
pull/620/head
Feist Josselin 4 years ago committed by GitHub
parent fb5b4e9d51
commit 683ebb924d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 48
      .github/workflows/linter.yml
  2. 6
      Dockerfile
  3. 8
      pyproject.toml

@ -0,0 +1,48 @@
---
name: Lint Code Base
defaults:
run:
# To load bashrc
shell: bash -ieo pipefail {0}
on:
pull_request:
branches: [master, dev]
jobs:
build:
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install dependencies
run: |
pip install .
pip install deepdiff numpy
echo 'SHELLCHECK_OPTS="-e SC1090"' >> ~/.bashrc
mkdir -p .github/linters
cp pyproject.toml .github/linters
- name: Lint everything
uses: docker://github/super-linter:v3
if: always()
env:
# run linter on everything to catch preexisting problems
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYTHON_PYLINT_CONFIG_FILE: pyproject.toml
VALIDATE_JSON: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_PYTHON_BLACK: false

@ -6,9 +6,9 @@ LABEL creator=trailofbits
LABEL dockerfile_maintenance=trailofbits LABEL dockerfile_maintenance=trailofbits
LABEL desc="Static Analyzer for Solidity" LABEL desc="Static Analyzer for Solidity"
RUN apt update \ RUN apt-get update \
&& apt upgrade -y \ && apt-get upgrade -y \
&& apt install -y git python3 python3-setuptools wget software-properties-common && apt-get install -y git python3 python3-setuptools wget software-properties-common
RUN wget https://github.com/ethereum/solidity/releases/download/v0.4.25/solc-static-linux \ RUN wget https://github.com/ethereum/solidity/releases/download/v0.4.25/solc-static-linux \
&& chmod +x solc-static-linux \ && chmod +x solc-static-linux \

@ -3,5 +3,11 @@ target-version = ["py36"]
line-length = 100 line-length = 100
[tool.pylint.messages_control] [tool.pylint.messages_control]
disable = """ disable = """
C0116,C0114 missing-module-docstring,
missing-class-docstring,
missing-function-docstring,
unnecessary-lambda,
bad-continuation,
cyclic-import,
line-too-long
""" """

Loading…
Cancel
Save