potiuk commented on issue #5790: [AIRFLOW-5180] Added static checks (yamllint)
+ auto-licences for yaml
URL: https://github.com/apache/airflow/pull/5790#issuecomment-523731645
@ashb - no, we do not need to add it. yamllint static check is not run in
Docker.
But we should add it as pre-requisite (just did)
```
- id: yamllint
name: Check yaml files with yamllint
entry: yamllint -c yamllint-config.yml
language: python
types: [yaml]
exclude:
^.*init_git_sync\.template\.yaml$|^.*airflow\.template\.yaml$
```
It would work out-of-the-box if we did not have [devel] extra.
The key is 'language: python' here. In this case Yamllint is run via yamlint
python pre-commit plugin. Those plugins (which are python-based) manage their
dependencies and virtualenvs on their own. Basically those built-in plugins
create their own small virtualenv where they install needed dependencies
(yamllint in this case) using `pip install .` and run the plugin within that
virtualenv. It's all done automagically by the pre-commit framework - without
docker. This works for simple stand-alone plugins like yamllint where you have
just one or two dependencies that are system-independent and can rely on
virtualenv. In our case yamllint is only installed with [devel] extra so we
need to add it as pre-requisite to be installed locally (it will complain if
yamllint is not installed)
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:
us...@infra.apache.org
With regards,
Apache Git Services