BasPH commented on issue #5238: [AIRFLOW-4364] Add Pylint to CI
URL: https://github.com/apache/airflow/pull/5238#issuecomment-495944615
 
 
   @potiuk Cool, that would work + no more hacky script for figuring out 
changed lines :) What do you think of the following:
   
   I have this command to run Pylint:
   
   ```bash
   find . -name "*.py" -not -path "./.eggs/*" -not -path 
"./airflow/www/node_modules/*" -not -path "./airflow/_vendor/*" | \
   grep -v 'airflow/[a-zA-Z_]*.py' | \
   grep -v 'tests/[a-zA-Z_]*.py' | \
   grep -v airflow/api | \
   grep -v airflow/bin | \
   grep -v airflow/config_templates | \
   grep -v airflow/contrib/auth | \
   grep -v airflow/contrib/hooks | \
   grep -v airflow/contrib/operators | \
   grep -v airflow/contrib/plugins | \
   grep -v airflow/contrib/sensors | \
   grep -v airflow/contrib/task_runner | \
   grep -v airflow/contrib/utils | \
   grep -v airflow/dag | \
   grep -v airflow/example_dags | \
   grep -v airflow/executors | \
   grep -v airflow/hooks | \
   grep -v airflow/jobs | \
   grep -v airflow/kubernetes | \
   grep -v airflow/lineage | \
   grep -v airflow/macros | \
   grep -v airflow/migrations | \
   grep -v airflow/models | \
   grep -v airflow/operators | \
   grep -v airflow/security | \
   grep -v airflow/sensors | \
   grep -v airflow/task | \
   grep -v airflow/ti_deps | \
   grep -v airflow/utils | \
   grep -v airflow/www | \
   grep -v dags | \
   grep -v docs | \
   grep -v scripts | \
   grep -v setup.py | \
   grep -v tests/api | \
   grep -v tests/cli | \
   grep -v tests/contrib/hooks | \
   grep -v tests/contrib/operators | \
   grep -v tests/contrib/sensors | \
   grep -v tests/contrib/task_runner | \
   grep -v tests/contrib/utils | \
   grep -v tests/executors | \
   grep -v tests/hooks | \
   grep -v tests/jobs | \
   grep -v tests/kubernetes | \
   grep -v tests/lineage | \
   grep -v tests/macros | \
   grep -v tests/migrations | \
   grep -v tests/minikube | \
   grep -v tests/models | \
   grep -v tests/operators | \
   grep -v tests/plugins | \
   grep -v tests/security | \
   grep -v tests/sensors | \
   grep -v tests/task | \
   grep -v tests/test_utils | \
   grep -v tests/ti_deps | \
   grep -v tests/utils | \
   grep -v tests/www | \
   xargs pylint --output-format=colorized
   ```
   
   For every `grep` line (58 total), I create an issue. In the issue, the 
person will remove the particular grep line and fix all Pylint issues that then 
occur. Once all grep lines are finally removed, the command will be:
   
   ```
   find . -name "*.py" -not -path "./.eggs/*" -not -path 
"./airflow/www/node_modules/*" -not -path "./airflow/_vendor/*" | xargs pylint 
--output-format=colorized
   ```
   
   If you agree, I will change this PR by removing the changed-line-checking 
scripting and running this command in the CI pipeline.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to