Closed fearsd closed 3 years ago
Hi!
Things to check:
I think workflows have right permissions
Can you send a link to recognize the actual violations? Logs in pipeline for wemake-python-styleguide:
/usr/bin/docker run --name c9a4171703b43a6918dfa7ede6b6aa2_3e2c1e --label 442333 --workdir /github/workspace --rm -e pythonLocation -e LD_LIBRARY_PATH -e GITHUB_TOKEN -e INPUT_REPORTER -e INPUT_PATH -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/idea_tracker_bot/idea_tracker_bot":"/github/workspace" 442333:1c9a4171703b43a6918dfa7ede6b6aa2 "." "github-pr-review"
Using reporter: github-pr-review
Linting path: .
flake8 --version:
3.9.2 (flake8-bandit: 2.1.2, flake8-broken-line: 0.3.0, flake8-bugbear:
21.4.3, flake8-comprehensions: 3.5.0, flake8-darglint: 1.8.0, flake8-debugger:
4.0.0, flake8-docstrings: 1.6.0, pydocstyle: 6.1.1, flake8-eradicate: 1.1.0,
flake8-string-format: 0.3.0, flake8_commas: 2.0.0, flake8_isort: 4.0.0,
flake8_quotes: 3.2.0, mccabe: 0.6.1, naming: 0.11.1, pycodestyle: 2.7.0,
pyflakes: 2.3.1, rst-docstrings: 0.2.3, wemake_python_styleguide: 0.15.3)
CPython 3.9.5 on Linux
=================================
except:
, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer except Exception:
. If you're sure what you're doing, be explicit and write except BaseException:
.
./main.py:23:1: D103 Missing docstring in public function
./main.py:24:5: WPS421 Found wrong function call: print
./main.py:25:12: WPS317 Found incorrect multi-line parameters
./main.py:26:45: C812 missing trailing comma
./main.py:27:25: WPS319 Found bracket in wrong position
./main.py:28:5: WPS421 Found wrong function call: print
./main.py:31:1: E302 expected 2 blank lines, found 1
./main.py:32:1: D103 Missing docstring in public function
./main.py:33:5: WPS421 Found wrong function call: print
./main.py:37:51: W292 no newline at end of file
./config.py:1:1: D100 Missing docstring in public module
./config.py:3:24: Q000 Remove bad quotes
./conftest.py:1:1: D100 Missing docstring in public module
./conftest.py:4:1: I003 isort expected 1 blank line in imports, found 0
./conftest.py:5:1: I003 isort expected 1 blank line in imports, found 0
./conftest.py:6:1: E302 expected 2 blank lines, found 1
./conftest.py:7:1: D103 Missing docstring in public function
./conftest.py:9:6: N806 variable 'SessionLocal' in function should be lowercase
./conftest.py:16:19: W292 no newline at end of file
./handlers.py:1:1: D100 Missing docstring in public module
./handlers.py:1:1: F401 'models.get_db' imported but unused
./handlers.py:4:1: D103 Missing docstring in public function
./handlers.py:4:22: WPS110 Found wrong variable name: data
./handlers.py:5:1: E800 Found commented out code
./models.py:1:1: D100 Missing docstring in public module
./models.py:2:1: I001 isort found an import in the wrong position
./models.py:3:1: I003 isort expected 1 blank line in imports, found 0
./models.py:3:1: I005 isort found an unexpected missing import
./models.py:6:1: I001 isort found an import in the wrong position
./models.py:7:1: I001 isort found an import in the wrong position
./models.py:11:1: D103 Missing docstring in public function
./models.py:12:9: W291 trailing whitespace
./models.py:13:9: WPS221 Found line with high Jones Complexity: 18 > 14
./models.py:13:10: N806 variable 'SQLALCHEMY_DATABASE_URL' in function should be lowercase
./models.py:13:35: WPS305 Found f
string
./models.py:13:80: E501 line too long (137 > 79 characters)
./models.py:14:5: E722 do not use bare 'except'
./models.py:14:5: B001 Do not use bare except:
, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer except Exception:
. If you're sure what you're doing, be explicit and write except BaseException:
.
./models.py:15:10: N806 variable 'SQLALCHEMY_DATABASE_URL' in function should be lowercase
./models.py:18:10: N806 variable 'SQLALCHEMY_DATABASE_URL' in function should be lowercase
./models.py:18:80: E501 line too long (100 > 79 characters)
./models.py:18:82: Q000 Remove bad quotes
./models.py:20:5: WPS331 Found variables that are only used for return
: engine
./models.py:22:1: E305 expected 2 blank lines after class or function definition, found 1
./models.py:24:1: E302 expected 2 blank lines, found 1
./models.py:24:1: D103 Missing docstring in public function
./models.py:26:6: N806 variable 'SessionLocal' in function should be lowercase
./models.py:28:5: WPS501 Found finally
in try
block without except
./models.py:33:1: E302 expected 2 blank lines, found 1
./models.py:33:1: D101 Missing docstring in public class
./models.py:39:1: D101 Missing docstring in public class
./models.py:39:1: WPS110 Found wrong variable name: Item
./models.py:46:25: Q000 Remove bad quotes
./models.py:46:49: W292 no newline at end of file./tests.py:1:1: D100 Missing docstring in public module
./tests.py:1:1: F401 'pytest' imported but unused
./tests.py:2:1: I003 isort expected 1 blank line in imports, found 0
./tests.py:3:1: I003 isort expected 1 blank line in imports, found 0
./tests.py:4:1: E302 expected 2 blank lines, found 1
./tests.py:4:1: D103 Missing docstring in public function
./tests.py:5:1: S101 Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
./tests.py:8:1: D103 Missing docstring in public function
./tests.py:9:1: S101 Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
./tests.py:12:1: D103 Missing docstring in public function
./tests.py:13:5: WPS110 Found wrong variable name: data
./tests.py:15:1: S101 Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
./tests.py:16:1: S101 Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
./tests.py:16:20: WPS421 Found wrong function call: dir
./tests.py:16:29: W292 no newline at end of file
./main.py:1:1: D100 Missing docstring in public module
./main.py:1:1: I001 isort found an import in the wrong position
./main.py:4:1: I001 isort found an import in the wrong position
./main.py:5:1: I001 isort found an import in the wrong position
./main.py:5:1: WPS458 Found imports collision: models
./main.py:5:1: WPS458 Found imports collision: models
./main.py:6:1: I001 isort found an import in the wrong position
./main.py:9:1: I003 isort expected 1 blank line in imports, found 0
./main.py:9:1: I005 isort found an unexpected missing import
./main.py:12:1: E722 do not use bare 'except'
./main.py:12:1: B001 Do not use bare except:
, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer except Exception:
. If you're sure what you're doing, be explicit and write except BaseException:
.
./main.py:23:1: D103 Missing docstring in public function
./main.py:24:5: WPS421 Found wrong function call: print
./main.py:25:12: WPS317 Found incorrect multi-line parameters
./main.py:26:45: C812 missing trailing comma
./main.py:27:25: WPS319 Found bracket in wrong position
./main.py:28:5: WPS421 Found wrong function call: print
./main.py:31:1: E302 expected 2 blank lines, found 1
./main.py:32:1: D103 Missing docstring in public function
./main.py:33:5: WPS421 Found wrong function call: print
./main.py:37:51: W292 no newline at end of file
./config.py:1:1: D100 Missing docstring in public module
./config.py:3:24: Q000 Remove bad quotes
./conftest.py:1:1: D100 Missing docstring in public module
./conftest.py:4:1: I003 isort expected 1 blank line in imports, found 0
./conftest.py:5:1: I003 isort expected 1 blank line in imports, found 0
./conftest.py:6:1: E302 expected 2 blank lines, found 1
./conftest.py:7:1: D103 Missing docstring in public function
./conftest.py:9:6: N806 variable 'SessionLocal' in function should be lowercase
./conftest.py:16:19: W292 no newline at end of file
./handlers.py:1:1: D100 Missing docstring in public module
./handlers.py:1:1: F401 'models.get_db' imported but unused
./handlers.py:4:1: D103 Missing docstring in public function
./handlers.py:4:22: WPS110 Found wrong variable name: data
./handlers.py:5:1: E800 Found commented out code
./models.py:1:1: D100 Missing docstring in public module
./models.py:2:1: I001 isort found an import in the wrong position
./models.py:3:1: I003 isort expected 1 blank line in imports, found 0
./models.py:3:1: I005 isort found an unexpected missing import
./models.py:6:1: I001 isort found an import in the wrong position
./models.py:7:1: I001 isort found an import in the wrong position
./models.py:11:1: D103 Missing docstring in public function
./models.py:12:9: W291 trailing whitespace
./models.py:13:9: WPS221 Found line with high Jones Complexity: 18 > 14
./models.py:13:10: N806 variable 'SQLALCHEMY_DATABASE_URL' in function should be lowercase
./models.py:13:35: WPS305 Found f
string
./models.py:13:80: E501 line too long (137 > 79 characters)
./models.py:14:5: E722 do not use bare 'except'
./models.py:14:5: B001 Do not use bare except:
, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer except Exception:
. If you're sure what you're doing, be explicit and write except BaseException:
.
./models.py:15:10: N806 variable 'SQLALCHEMY_DATABASE_URL' in function should be lowercase
./models.py:18:10: N806 variable 'SQLALCHEMY_DATABASE_URL' in function should be lowercase
./models.py:18:80: E501 line too long (100 > 79 characters)
./models.py:18:82: Q000 Remove bad quotes
./models.py:20:5: WPS331 Found variables that are only used for return
: engine
./models.py:22:1: E305 expected 2 blank lines after class or function definition, found 1
./models.py:24:1: E302 expected 2 blank lines, found 1
./models.py:24:1: D103 Missing docstring in public function
./models.py:26:6: N806 variable 'SessionLocal' in function should be lowercase
./models.py:28:5: WPS501 Found finally
in try
block without except
./models.py:33:1: E302 expected 2 blank lines, found 1
./models.py:33:1: D101 Missing docstring in public class
./models.py:39:1: D101 Missing docstring in public class
./models.py:39:1: WPS110 Found wrong variable name: Item
./models.py:46:25: Q000 Remove bad quotes
./models.py:46:49: W292 no newline at end of file
Process failed with the status code: 1
I suppose the problem in
`reviewdog: this is not PullRequest build.`
I found only one case in the internet https://stackoverflow.com/questions/66309574/reviewdog-this-is-not-pullrequest-build
But it connected with JS and CircleCI
3. Ok, I will notice it. Is it reviewdog limitation?
4. Yes, I learned the logs from this pull request and noticed the suspicious log mentioned above.
P.S
Sorry if I didn't grasp something correctly, I started using Github Actions today)
Yes,
I suppose the problem in reviewdog: this is not PullRequest build.
Looks like the root of this problem! 👍
Ok, it was my mistake 😅. I put in workflow file on: push
, when reviewdog only works with on: pull_request
. After this fix, action started making reviews. https://github.com/fearsd/idea_tracker_bot/pull/8. Thanks!
Glad it worked!
What's wrong
Github action doesn't create PR review as it described in docs. You can check it there https://github.com/fearsd/idea_tracker_bot/pull/8
How it should be
It should create PR reviews
Flake8 version and plugins
pip information
OS information
macOS 11.3.1 - local machine github action - ubuntu-latest