-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add YAML file linter config file #6896
Conversation
This adds `check/yamllint` and a corresponding configuration file `.yamllint.yaml`. Running `./check/yamllint` will check all `.yaml` files recursively from the top of the source tree. Arguments can be passed to the script so that, e.g., `./check/yamllint somefilename` will limit action to only the file _somefilename_.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6896 +/- ##
=======================================
Coverage 97.87% 97.87%
=======================================
Files 1084 1084
Lines 94420 94465 +45
=======================================
+ Hits 92409 92454 +45
Misses 2011 2011 ☔ View full report in Codecov by Sentry. |
Why do we have this? Are there really that many yaml files in cirq? Is this just linitng the github config files? |
Well, there are also yaml files in docs/
There is also the CodeCov config file, and there's a bunch in a couple of dev_tools/ subdirectories. I'm planning to add a pull-requests checks workflow for linting yaml files. The goal of this PR was to get the config yamllint file in place and let people test it out. |
Per discussion on PR quantumlib#6895, we decided to work towards removing unnecessary check/foo scripts in favor of having people run commands directly.
Per comment by @pavoljuhas on another issue, I removed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
As a follow-up we should clean up the detected lint (we have an internal Should we create a tracking issue for that? |
This adds a configuration file
.yamllint.yaml
so that people can runyamllint
to check the YAML files for syntax errors and conformance to style guidelines.