-
Notifications
You must be signed in to change notification settings - Fork 46
yaml linter #308
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
Comments
I like the idea, but the problem with this is that the CCI hooks don't require any other Python package so far and requiring dependencies makes handling them more complex |
True. Also, we avoided linter because not all contributors know Python, I believe most people are C/C++ devs. So if we start to block because of linters, probably more users will give up first PR. I would consider it as a recommendation in Docs, and of course, we can implement yaml linter hook, but not mandatory for CCI. I totally understand the trade off situation, we could avoid more errors in CCI. |
Yes, this bothers me too. I searched for another linter directly callable from python code, but could not find one. I still posted the issue because maybe someone here knows one ?
Just to be clear, the purpose is not to catch style errors, nor smelly code, but real errors with zero false positives. |
Fair enough. I'll bring this issue to the CCI team. I'm a big fan of automation, so if we can reduce more errors adapting it, this would be cool. |
After talking to Conan team, the decision was using yaml linter internally in Jenkins, not as a hook. We can update the Docs explaining about yamllinter and internal check. The point is, it's interesting adding it, but not forcing conan-center hook with an external dependency, so the idea is adding into CDT Jenkins images and run before or after Conan export. |
One new case today: conan-io/conan-center-index#6214 (review) This is the "lucky" version, because it makes the build crash
|
Thank you for reporting! |
This is a nice! |
We should consider linting conandata.yml and config.yml files, for example using yamllint
Example of case where it would have save some non negligible debugging time: conan-io/conan-center-index@61eb407#diff-c72439ef9b3281fe119686121ba38bb839dc40459798c2641142eb4135f15f61R16
exemple of execution with yamllint:
test.yml:
The text was updated successfully, but these errors were encountered: