From 1cde6b2eff5721175725e9cc5f80191d8276e1e8 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Tue, 16 Jul 2024 21:15:08 -0400 Subject: [PATCH] Disallow use of eval with pylint (#4033) --- .github/workflows/pylint.yml | 23 +++++++++++++++++++++++ .pylintrc | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/pylint.yml create mode 100644 .pylintrc diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 00000000..5effbea3 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,23 @@ +name: Python Linting + +on: [push, pull_request] + +jobs: + pylint: + name: Run Pylint + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - name: Install Pylint + run: pip install pylint + + - name: Run Pylint + run: pylint --rcfile=.pylintrc $(find . -type f -name "*.py") diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 00000000..a5da56e5 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,3 @@ +[MESSAGES CONTROL] +disable=all +enable=eval-used