Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pylint action is broken #636

Closed
FelixBenning opened this issue Aug 30, 2020 · 11 comments
Closed

pylint action is broken #636

FelixBenning opened this issue Aug 30, 2020 · 11 comments

Comments

@FelixBenning
Copy link

In https://github.com/actions/starter-workflows/blob/main/ci/pylint.yml, the last line:

pylint `ls -R|grep .py$|xargs`

does not work as intended. ls -R | grep .py$ lists all files with the .py ending. Only the files not the path to them. So it will find .py files in a subdirectory, and pass them to pylint which is then unable to find them on the top level. Causing errors like this:

vscode@5aa8d281d9b3:/workspaces/lazyConfig$ ls -R|grep .py$
setup.py
__init__.py
config.py
lazyData.py
__init__.py
config.py
lazyData.py
__init__.py
smoke_test.py
vscode@5aa8d281d9b3:/workspaces/lazyConfig$ pylint config.py
************* Module config.py
config.py:1:0: F0001: No module named config.py (fatal)
vscode@5aa8d281d9b3:/workspaces/lazyConfig$ 

I'll see if I can fix this and open a pull request if I can find a good fix.

@leftour
Copy link

leftour commented Oct 30, 2020

1604090159820-1170129144 الان أحتاج البرامج انا لدي نشام أندرويد إذن فل نبحث التطبيقات التي يمكن وهي استعمالها

@jDavidnet
Copy link

I've noticed 2 core problems with the current workflow script.

  • it doesn't correctly ingest python scripts in a directory
  • it didn't correctly install the requirements for other modules

Here is the corrected code that works on my current workflow, this is based on the above pull request, with some additional fixes.

name: Pylint

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python 3.8
      uses: actions/setup-python@v1
      with:
        python-version: 3.8
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install pylint
        if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
    - name: Analysing the code with pylint
      run: |
        python -m pylint --fail-under=10 `find -regextype egrep -regex '(.*.py)$'` |
        tee pylint.txt
    - name: Upload pylint.txt as artifact
      uses: actions/upload-artifact@v2
      with:
        name: pylint report
        path: pylint.txt

@github-actions
Copy link

This issue has become stale and will be closed automatically within a period of time. Sorry about that.

@FelixBenning
Copy link
Author

not stale: just merge the pull request (#637) already

ModernMAK added a commit to ModernMAK/Evil-Genius-2-Reverse-Engineering that referenced this issue May 2, 2021
TechnoX pushed a commit to DynoRobotics/dialogflow_ros that referenced this issue May 15, 2021
JohnTheCoolingFan added a commit to JohnTheCoolingFan/Motorchik that referenced this issue Jun 16, 2021
@SenorPez
Copy link

Absolutely unbelievable that a core function is broken and unfixed.

SenorPez added a commit to SenorPez/glowing-potato that referenced this issue Jun 18, 2021
BoPeng pushed a commit to vatlab/sos that referenced this issue Jun 27, 2021
@Phil7789
Copy link

I've noticed 2 core problems with the current workflow script.

  • it doesn't correctly ingest python scripts in a directory
  • it didn't correctly install the requirements for other modules

Here is the corrected code that works on my current workflow, this is based on the above pull request, with some additional fixes.

- name: Analysing the code with pylint
  run: |
    python -m pylint --fail-under=10 `find -regextype egrep -regex '(.*.py)$'` |
    tee pylint.txt
- name: Upload pylint.txt as artifact
  uses: actions/upload-artifact@v2
  with:
    name: pylint report
    path: pylint.txt

I've copied this code / the code from the PR
I've noticed that using python -m pylint like in your example instead of just pylint like in the PR the --fail-under flag doesn't work and always passes, although the score is below the threshold.

phasenoisepon added a commit to phasenoisepon/code_exercises that referenced this issue Aug 19, 2021
phasenoisepon added a commit to phasenoisepon/code_exercises that referenced this issue Aug 19, 2021
* Create pylint.yml

* push

* test change

* Update pylint.yml

- attempts fix from actions/starter-workflows#636

* derp

* fix
@cesarcoatl
Copy link
Contributor

I've had success running the following:

      run: |
        pylint $(git ls-files '*.py')

btb added a commit to uw-asa/django-ems-r25 that referenced this issue Sep 11, 2021
@cesarcoatl cesarcoatl mentioned this issue Sep 19, 2021
22 tasks
snapcat added a commit to CSC510-Group-25/feature-hunt that referenced this issue Oct 23, 2021
run: pylint --fail-under=1 $(find . -name "*.py" | xargs)
note: set the failure threshold as indicated above

actions/starter-workflows#636 (comment)
peeyush10234 pushed a commit to CSC510-Group-25/feature-hunt that referenced this issue Oct 25, 2021
* Added simple log in form, added material ui

* Added Dashboard and stored user email in the session

* Added logic to restrict based feature tagging on log in

* added pylint workflow w/artifacts

run: pylint --fail-under=1 $(find . -name "*.py" | xargs)
note: set the failure threshold as indicated above

actions/starter-workflows#636 (comment)

* Added CodeQL & Pylint badges, edits

* Added CodeQL badge
* Added Pylint badge
* Minor edits: updated git clone steps

* Lowered pylint failure theshold

* Update and rename build.yml to coveralls.yml

* Added test files to pylint.yml

* Updated py files to improve pylint score

* Fixed error in coveralls.yml

* Removed individual tests in pylint.yml

* Added pylint labels

* Added test workflow

* Update and rename nodejsTest.yml to nodejs.yml

* Update nodejs.yml

* Update nodejs.yml

* Added workflow build badge to README

* Added yet another workflow

 All for the sake of a test badge.

* Added test badge

* Rearranged README badges

Co-authored-by: Emily Tracey <etracey@ncsu.edu>
snapcat added a commit to CSC510-Group-25/feature-hunt that referenced this issue Oct 27, 2021
commit 66d5c82
Author: Leila Moran <lmmoran@ncsu.edu>
Date:   Mon Oct 25 02:40:12 2021 -0400

    group25 workflows (#65)

    * Added simple log in form, added material ui

    * Added Dashboard and stored user email in the session

    * Added logic to restrict based feature tagging on log in

    * added pylint workflow w/artifacts

    run: pylint --fail-under=1 $(find . -name "*.py" | xargs)
    note: set the failure threshold as indicated above

    actions/starter-workflows#636 (comment)

    * Added CodeQL & Pylint badges, edits

    * Added CodeQL badge
    * Added Pylint badge
    * Minor edits: updated git clone steps

    * Lowered pylint failure theshold

    * Update and rename build.yml to coveralls.yml

    * Added test files to pylint.yml

    * Updated py files to improve pylint score

    * Fixed error in coveralls.yml

    * Removed individual tests in pylint.yml

    * Added pylint labels

    * Added test workflow

    * Update and rename nodejsTest.yml to nodejs.yml

    * Update nodejs.yml

    * Update nodejs.yml

    * Added workflow build badge to README

    * Added yet another workflow

     All for the sake of a test badge.

    * Added test badge

    * Rearranged README badges

    Co-authored-by: Emily Tracey <etracey@ncsu.edu>
XelK added a commit to XelK/pi_hole_api that referenced this issue Nov 1, 2021
jhnguye4 pushed a commit to CSC510-Group-25/feature-hunt that referenced this issue Nov 3, 2021
* added pylint workflow w/artifacts

run: pylint --fail-under=1 $(find . -name "*.py" | xargs)
note: set the failure threshold as indicated above

actions/starter-workflows#636 (comment)

* Added CodeQL & Pylint badges, edits

* Added CodeQL badge
* Added Pylint badge
* Minor edits: updated git clone steps

* Lowered pylint failure theshold

* Update and rename build.yml to coveralls.yml

* Added test files to pylint.yml

* Updated py files to improve pylint score

* Fixed error in coveralls.yml

* Removed individual tests in pylint.yml

* Added pylint labels

* Added test workflow

* Update and rename nodejsTest.yml to nodejs.yml

* Update nodejs.yml

* Update nodejs.yml

* Added workflow build badge to README

* Added yet another workflow

 All for the sake of a test badge.

* Added test badge

* Revert "group25 workflows"

* Added post to Service.js and connected login form (incomplete)

* Added appropriate error messages and display for errors

* Added Sign up form

* Added error handling and redirecting for login and sign up

* fix to react compile warning

* Dashboard and tag edits are now limited by user

* New tags can now be saved in the database

* Adding Product Controller and Test Cases

* Adding more user auth and product auth test cases

* Changing gitignore

* Fixing test cases for user-auth class

* Removing test cases which are not used

* Commented out unused tests, added pylint comments

* Restored and commented out unused tests
* Added pylint skip comments

Co-authored-by: Leila Moran <lmmoran@ncsu.edu>
Co-authored-by: Emily Tracey <etracey@ncsu.edu>
Co-authored-by: peeyush10234 <ptaneja@ncsu.edu>
jhnguye4 pushed a commit to CSC510-Group-25/feature-hunt that referenced this issue Nov 3, 2021
* added pylint workflow w/artifacts

run: pylint --fail-under=1 $(find . -name "*.py" | xargs)
note: set the failure threshold as indicated above

actions/starter-workflows#636 (comment)

* Added CodeQL & Pylint badges, edits

* Added CodeQL badge
* Added Pylint badge
* Minor edits: updated git clone steps

* Lowered pylint failure theshold

* Update and rename build.yml to coveralls.yml

* Added test files to pylint.yml

* Updated py files to improve pylint score

* Fixed error in coveralls.yml

* Removed individual tests in pylint.yml

* Added pylint labels

* Added test workflow

* Update and rename nodejsTest.yml to nodejs.yml

* Update nodejs.yml

* Update nodejs.yml

* Added workflow build badge to README

* Added yet another workflow

 All for the sake of a test badge.

* Added test badge

* Revert "group25 workflows"

* Added post to Service.js and connected login form (incomplete)

* Added appropriate error messages and display for errors

* Added Sign up form

* Added error handling and redirecting for login and sign up

* fix to react compile warning

* Dashboard and tag edits are now limited by user

* New tags can now be saved in the database

* Adding Product Controller and Test Cases

* Adding more user auth and product auth test cases

* Changing gitignore

* Fixing test cases for user-auth class

* Removing test cases which are not used

* Commented out unused tests, added pylint comments

* Restored and commented out unused tests
* Added pylint skip comments

* Removing merging backend and backend-new into a single directory

* Increasing Pylint Score

* Increasing Pylint score

Co-authored-by: Leila Moran <lmmoran@ncsu.edu>
Co-authored-by: Emily Tracey <etracey@ncsu.edu>
Co-authored-by: peeyush10234 <ptaneja@ncsu.edu>
jhnguye4 pushed a commit to CSC510-Group-25/feature-hunt that referenced this issue Nov 4, 2021
* added pylint workflow w/artifacts

run: pylint --fail-under=1 $(find . -name "*.py" | xargs)
note: set the failure threshold as indicated above

actions/starter-workflows#636 (comment)

* Added CodeQL & Pylint badges, edits

* Added CodeQL badge
* Added Pylint badge
* Minor edits: updated git clone steps

* Lowered pylint failure theshold

* Update and rename build.yml to coveralls.yml

* Added test files to pylint.yml

* Updated py files to improve pylint score

* Fixed error in coveralls.yml

* Removed individual tests in pylint.yml

* Added pylint labels

* Added test workflow

* Update and rename nodejsTest.yml to nodejs.yml

* Update nodejs.yml

* Update nodejs.yml

* Added workflow build badge to README

* Added yet another workflow

 All for the sake of a test badge.

* Added test badge

* Revert "group25 workflows"

* Added post to Service.js and connected login form (incomplete)

* Added appropriate error messages and display for errors

* Added Sign up form

* Added error handling and redirecting for login and sign up

* fix to react compile warning

* Dashboard and tag edits are now limited by user

* New tags can now be saved in the database

* Adding Product Controller and Test Cases

* Adding more user auth and product auth test cases

* Changing gitignore

* Fixing test cases for user-auth class

* Removing test cases which are not used

* Commented out unused tests, added pylint comments

* Restored and commented out unused tests
* Added pylint skip comments

* Removing merging backend and backend-new into a single directory

* Increasing Pylint Score

* Increasing Pylint score

* Restored deleted backend files

* Removing backend-new and merging it with backend dir

Co-authored-by: Leila Moran <lmmoran@ncsu.edu>
Co-authored-by: Emily Tracey <etracey@ncsu.edu>
Co-authored-by: peeyush10234 <ptaneja@ncsu.edu>
OfficialMuffin added a commit to OfficialMuffin/UsernameStorage that referenced this issue Nov 22, 2021
nickelyx pushed a commit to Knox-AAU/PreprocessingLayer_Grundfos that referenced this issue Nov 26, 2021
@github-actions
Copy link

github-actions bot commented Dec 8, 2021

This issue has become stale and will be closed automatically within a period of time. Sorry about that.

@mehran-sayyah
Copy link

Hi

@cesarcoatl
Copy link
Contributor

#1108

fahadahammed added a commit to fahadahammed/lbfi that referenced this issue Dec 21, 2021
divulgacheur added a commit to divulgacheur/TGV_Maximize that referenced this issue Jan 12, 2022
Fix broken pylint in GitHub Actions, linked issue :
actions/starter-workflows#636
joshmgross added a commit that referenced this issue Jan 19, 2022
ref: #636. `pylint` command does not work

I've had success running the modified command [here](https://github.com/thecesrom/incendium/blob/project/.github/workflows/pylint.yml).

Co-authored-by: Josh Gross <joshmgross@github.com>
@cesarcoatl
Copy link
Contributor

With #1108 merged, this can be closed.

Sumedh-Patkar pushed a commit to Sumedh-Patkar/feature-hunt that referenced this issue Nov 28, 2023
* Added simple log in form, added material ui

* Added Dashboard and stored user email in the session

* Added logic to restrict based feature tagging on log in

* added pylint workflow w/artifacts

run: pylint --fail-under=1 $(find . -name "*.py" | xargs)
note: set the failure threshold as indicated above

actions/starter-workflows#636 (comment)

* Added CodeQL & Pylint badges, edits

* Added CodeQL badge
* Added Pylint badge
* Minor edits: updated git clone steps

* Lowered pylint failure theshold

* Update and rename build.yml to coveralls.yml

* Added test files to pylint.yml

* Updated py files to improve pylint score

* Fixed error in coveralls.yml

* Removed individual tests in pylint.yml

* Added pylint labels

* Added test workflow

* Update and rename nodejsTest.yml to nodejs.yml

* Update nodejs.yml

* Update nodejs.yml

* Added workflow build badge to README

* Added yet another workflow

 All for the sake of a test badge.

* Added test badge

* Rearranged README badges

Co-authored-by: Emily Tracey <etracey@ncsu.edu>
Sumedh-Patkar pushed a commit to Sumedh-Patkar/feature-hunt that referenced this issue Nov 28, 2023
* added pylint workflow w/artifacts

run: pylint --fail-under=1 $(find . -name "*.py" | xargs)
note: set the failure threshold as indicated above

actions/starter-workflows#636 (comment)

* Added CodeQL & Pylint badges, edits

* Added CodeQL badge
* Added Pylint badge
* Minor edits: updated git clone steps

* Lowered pylint failure theshold

* Update and rename build.yml to coveralls.yml

* Added test files to pylint.yml

* Updated py files to improve pylint score

* Fixed error in coveralls.yml

* Removed individual tests in pylint.yml

* Added pylint labels

* Added test workflow

* Update and rename nodejsTest.yml to nodejs.yml

* Update nodejs.yml

* Update nodejs.yml

* Added workflow build badge to README

* Added yet another workflow

 All for the sake of a test badge.

* Added test badge

* Revert "group25 workflows"

* Added post to Service.js and connected login form (incomplete)

* Added appropriate error messages and display for errors

* Added Sign up form

* Added error handling and redirecting for login and sign up

* fix to react compile warning

* Dashboard and tag edits are now limited by user

* New tags can now be saved in the database

* Adding Product Controller and Test Cases

* Adding more user auth and product auth test cases

* Changing gitignore

* Fixing test cases for user-auth class

* Removing test cases which are not used

* Commented out unused tests, added pylint comments

* Restored and commented out unused tests
* Added pylint skip comments

Co-authored-by: Leila Moran <lmmoran@ncsu.edu>
Co-authored-by: Emily Tracey <etracey@ncsu.edu>
Co-authored-by: peeyush10234 <ptaneja@ncsu.edu>
Sumedh-Patkar pushed a commit to Sumedh-Patkar/feature-hunt that referenced this issue Nov 28, 2023
* added pylint workflow w/artifacts

run: pylint --fail-under=1 $(find . -name "*.py" | xargs)
note: set the failure threshold as indicated above

actions/starter-workflows#636 (comment)

* Added CodeQL & Pylint badges, edits

* Added CodeQL badge
* Added Pylint badge
* Minor edits: updated git clone steps

* Lowered pylint failure theshold

* Update and rename build.yml to coveralls.yml

* Added test files to pylint.yml

* Updated py files to improve pylint score

* Fixed error in coveralls.yml

* Removed individual tests in pylint.yml

* Added pylint labels

* Added test workflow

* Update and rename nodejsTest.yml to nodejs.yml

* Update nodejs.yml

* Update nodejs.yml

* Added workflow build badge to README

* Added yet another workflow

 All for the sake of a test badge.

* Added test badge

* Revert "group25 workflows"

* Added post to Service.js and connected login form (incomplete)

* Added appropriate error messages and display for errors

* Added Sign up form

* Added error handling and redirecting for login and sign up

* fix to react compile warning

* Dashboard and tag edits are now limited by user

* New tags can now be saved in the database

* Adding Product Controller and Test Cases

* Adding more user auth and product auth test cases

* Changing gitignore

* Fixing test cases for user-auth class

* Removing test cases which are not used

* Commented out unused tests, added pylint comments

* Restored and commented out unused tests
* Added pylint skip comments

* Removing merging backend and backend-new into a single directory

* Increasing Pylint Score

* Increasing Pylint score

Co-authored-by: Leila Moran <lmmoran@ncsu.edu>
Co-authored-by: Emily Tracey <etracey@ncsu.edu>
Co-authored-by: peeyush10234 <ptaneja@ncsu.edu>
Sumedh-Patkar pushed a commit to Sumedh-Patkar/feature-hunt that referenced this issue Nov 28, 2023
…0-Group-25#156)

* added pylint workflow w/artifacts

run: pylint --fail-under=1 $(find . -name "*.py" | xargs)
note: set the failure threshold as indicated above

actions/starter-workflows#636 (comment)

* Added CodeQL & Pylint badges, edits

* Added CodeQL badge
* Added Pylint badge
* Minor edits: updated git clone steps

* Lowered pylint failure theshold

* Update and rename build.yml to coveralls.yml

* Added test files to pylint.yml

* Updated py files to improve pylint score

* Fixed error in coveralls.yml

* Removed individual tests in pylint.yml

* Added pylint labels

* Added test workflow

* Update and rename nodejsTest.yml to nodejs.yml

* Update nodejs.yml

* Update nodejs.yml

* Added workflow build badge to README

* Added yet another workflow

 All for the sake of a test badge.

* Added test badge

* Revert "group25 workflows"

* Added post to Service.js and connected login form (incomplete)

* Added appropriate error messages and display for errors

* Added Sign up form

* Added error handling and redirecting for login and sign up

* fix to react compile warning

* Dashboard and tag edits are now limited by user

* New tags can now be saved in the database

* Adding Product Controller and Test Cases

* Adding more user auth and product auth test cases

* Changing gitignore

* Fixing test cases for user-auth class

* Removing test cases which are not used

* Commented out unused tests, added pylint comments

* Restored and commented out unused tests
* Added pylint skip comments

* Removing merging backend and backend-new into a single directory

* Increasing Pylint Score

* Increasing Pylint score

* Restored deleted backend files

* Removing backend-new and merging it with backend dir

Co-authored-by: Leila Moran <lmmoran@ncsu.edu>
Co-authored-by: Emily Tracey <etracey@ncsu.edu>
Co-authored-by: peeyush10234 <ptaneja@ncsu.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants