Flake8 Linting Issues Not Detected in check code format (Pull Request) Workflow
Closed this issue · 2 comments
Describe the bug
Discrepancy in Flake8 linting results between workflows triggered on pull requests(check code format) workflow and workflows triggered on daily basis (Ubuntu (latest) workflow).
Expected Behavior:
Flake8 linting issues should be detected and reported in the pull request workflow, avoiding linting mistakes while committing to the development branch.
Actual Behavior:
Flake8 linting issues are detected only after the PR is merged. When a PR is raised, no Flake8 issues are shown, even if the code contains linting issues.
This issue is causing daily workflow to fail i.e Ubuntu (latest) workflow.
To Reproduce
Steps to reproduce the behavior:
- Create a New Pull Request with code changes that intentionally introduce Flake8 linting issues (e.g., extra whitespace, undefined variables).
- Observe the Pull Request (check code format) Workflow Execution:
- The Check code format workflow runs but does not detect the introduced Flake8 linting issues.
- Merge the PR into the develop branch.
- Observe the daily(Ubuntu (latest)) Workflow Execution:
- Flake8 linting issues are deteceted.
Expected behavior
The Flake8 linting issues should be detected and reported in the pull request workflow to prevent the merge of code with formatting issues.
Environment:
OS: Ubuntu (latest)
@rajithkrishnegowda We run formatter and linter checks in CI using ./shell/lint.sh
, which internally uses flake8
configuration from setup.cfg
. The discrepancy appears here because it does not know what warnings to ignore from the lack of a config file. Regardless, I recommend flake8-related checks be removed from all other CI tests, since we do it once during PR anyway.
Issue was fixed in #1130