diff --git a/.github/workflows/pyflake.yml b/.github/workflows/pyflake.yml new file mode 100644 index 0000000..3597be5 --- /dev/null +++ b/.github/workflows/pyflake.yml @@ -0,0 +1,19 @@ +name: Python PyFlakes + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Install dependencies + run: | + pip install pyflakes + - name: Run linters + run: | + pyflakes $(find . -name "*.py") > post_traces/pyflakes_report.txt diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..a0c0475 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,19 @@ +name: Python PyLint + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Install dependencies + run: | + pip install pylint + - name: Run linters + run: | + pylint $(find . -name "*.py") > post_traces/pylint_report.txt diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md index 4062f13..300f2ca 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ +Group No 38 - Makarand, Varun, Michelle [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Language](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue) ![Platform](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) ![Unit tests](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/unit-test-cases.yml/badge.svg) ![PEP8 Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/autopep.yml/badge.svg) +![PyLint Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pylint.yml/badge.svg) +![PyFlake Check](https://github.com/GradHackersGuild/se-homework-2/actions/workflows/pyflake.yml/badge.svg) diff --git a/post_traces/pylint_output_rand.txt b/post_traces/pylint_output_rand.txt new file mode 100644 index 0000000..0fb78db --- /dev/null +++ b/post_traces/pylint_output_rand.txt @@ -0,0 +1,9 @@ +************* Module rand +rand.py:1:0: C0114: Missing module docstring (missing-module-docstring) +rand.py:4:0: C0116: Missing function or method docstring (missing-function-docstring) +rand.py:6:4: C0200: Consider using enumerate instead of iterating with range and len (consider-using-enumerate) +rand.py:5:4: W0612: Unused variable 'shuffled_num' (unused-variable) + +----------------------------------- +Your code has been rated at 3.33/10 +