From 2cef5b29710dcf4e97b4f34dd8f6a30d2278f9ad Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 21:09:26 -0400 Subject: [PATCH 1/6] added pylint and pyflakes --- .github/workflows/pyflake.yml | 19 +++++++++++++++++++ .github/workflows/pylint.yml | 19 +++++++++++++++++++ .github/workflows/static-analysis.yml | 0 post_traces/pylint_output_rand.txt | 9 +++++++++ 4 files changed, 47 insertions(+) create mode 100644 .github/workflows/pyflake.yml create mode 100644 .github/workflows/pylint.yml delete mode 100644 .github/workflows/static-analysis.yml create mode 100644 post_traces/pylint_output_rand.txt diff --git a/.github/workflows/pyflake.yml b/.github/workflows/pyflake.yml new file mode 100644 index 0000000..22d3ec3 --- /dev/null +++ b/.github/workflows/pyflake.yml @@ -0,0 +1,19 @@ +name: Python Linting + +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") diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..008a248 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,19 @@ +name: Python Linting + +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") diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml deleted file mode 100644 index e69de29..0000000 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 + From 3ee6db4f54b70016e53992b7aa7802d9ad38ee3e Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 21:10:07 -0400 Subject: [PATCH 2/6] added pylint and pyflakes --- .github/workflows/pyflake.yml | 2 +- .github/workflows/pylint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pyflake.yml b/.github/workflows/pyflake.yml index 22d3ec3..23e2515 100644 --- a/.github/workflows/pyflake.yml +++ b/.github/workflows/pyflake.yml @@ -1,4 +1,4 @@ -name: Python Linting +name: Python PyFlakes on: [push, pull_request] diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 008a248..6de2b25 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,4 +1,4 @@ -name: Python Linting +name: Python PyLint on: [push, pull_request] From 1d9be79fd37715b25c7a87cc4d26d37f4d70f739 Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 21:27:34 -0400 Subject: [PATCH 3/6] added reports to a folder --- .github/workflows/pyflake.yml | 2 +- .github/workflows/pylint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pyflake.yml b/.github/workflows/pyflake.yml index 23e2515..b14aeec 100644 --- a/.github/workflows/pyflake.yml +++ b/.github/workflows/pyflake.yml @@ -16,4 +16,4 @@ jobs: pip install pyflakes - name: Run linters run: | - pyflakes $(find . -name "*.py") + pyflakes $(find . -name "*.py") > post_traces/pyflakes_report.txt || true diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 6de2b25..403e523 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -16,4 +16,4 @@ jobs: pip install pylint - name: Run linters run: | - pylint $(find . -name "*.py") + pylint $(find . -name "*.py") > post_traces/pylint_report.txt || true From c7751fb4ee1679d31e211d6f19f4b2aab92c7552 Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 21:28:38 -0400 Subject: [PATCH 4/6] added pylint and pyflakes --- .github/workflows/pyflake.yml | 2 +- .github/workflows/pylint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pyflake.yml b/.github/workflows/pyflake.yml index b14aeec..3597be5 100644 --- a/.github/workflows/pyflake.yml +++ b/.github/workflows/pyflake.yml @@ -16,4 +16,4 @@ jobs: pip install pyflakes - name: Run linters run: | - pyflakes $(find . -name "*.py") > post_traces/pyflakes_report.txt || true + pyflakes $(find . -name "*.py") > post_traces/pyflakes_report.txt diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 403e523..a0c0475 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -16,4 +16,4 @@ jobs: pip install pylint - name: Run linters run: | - pylint $(find . -name "*.py") > post_traces/pylint_report.txt || true + pylint $(find . -name "*.py") > post_traces/pylint_report.txt From 71ab62807cfaaa0502f7774672b3db00c25ec990 Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 12 Sep 2024 21:40:01 -0400 Subject: [PATCH 5/6] added badges for pylint and pycheck --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4062f13..644f85c 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,5 @@ ![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) From 8be85647d83a476594cc4636733ecbce930f7c11 Mon Sep 17 00:00:00 2001 From: MakarandPundlik Date: Thu, 3 Oct 2024 03:02:20 -0400 Subject: [PATCH 6/6] updated readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 644f85c..300f2ca 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +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)