cluster-api-provider-ibmcloud
cluster-api-provider-ibmcloud copied to clipboard
Add .yamllint config file to use yamllint to enhance linting for yaml files
… files
What this PR does / why we need it:
This PR adds a .yamllint config file which has rules to config yamllint to enhance linting for yaml files. The lint will be helpful to avoid issues like https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/commit/7cd7fcc1c0448df9caae393fa63720a874b36c85.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):
Fixes #1497
Special notes for your reviewer:
This is a quick implementation just to give an overview and directions, I will continuously make improvements and changes as needed.
To install and use yamllint: Quickstart
To see the behavior: Run yamllint .
in the project root directory to lint all yaml files.
/area provider/ibmcloud
- Please confirm that if this PR changes any image versions, then that's the sole change this PR makes. This PR doesn't change any image versions.
Release note:
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: yuanning6 / name: Yuanning Liu (92765a29db4da7ad11b85a1e9af08230fcfded1b, 0c4bfa76de50564f4c8a89d4c87aae7d1360f4c0)
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: yuanning6 Once this PR has been reviewed and has the lgtm label, please assign jichenjc for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!
Name | Link |
---|---|
Latest commit | 0c4bfa76de50564f4c8a89d4c87aae7d1360f4c0 |
Latest deploy log | https://app.netlify.com/sites/kubernetes-sigs-cluster-api-ibmcloud/deploys/65a857fe8333c30008bede5a |
Deploy Preview | https://deploy-preview-1521--kubernetes-sigs-cluster-api-ibmcloud.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Welcome @yuanning6!
It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-ibmcloud 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes-sigs/cluster-api-provider-ibmcloud has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
Hi @yuanning6. Thanks for your PR.
I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/cc @Prajyot-Parab
/easycla
/ok-to-test
@yuanning6 Few Pointers -
- Include a Makefile target to install yamllint
- Skip autogenerated config dir from liniting (config dir)
- lets fix all the linting issues seen
@yuanning6 Few Pointers -
- Include a Makefile target to install yamllint
- Skip autogenerated config dir from liniting (config dir)
- lets fix all the linting issues seen
@Prajyot-Parab Thank you for taking the review! I'll work on them after the busy finals :')
@Prajyot-Parab Hi! I made some changes based on your pointers: https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/pull/1521/commits/d1ab3ea2bd8ad15642a4e5a76fec0925f37d671b
I removed one rule which was to check the Document Start Marker from yaml files. Now it gives warning: "missing document start "---"", it used to give another warning when the Document Start Marker is not asked: "found forbidden document start "---"". Not sure whether this rule should be included or not, it gives a warning no matter what. To output only error level problems we can use --no-warnings
flag.
Regarding the Makefile part, I'm not sure if I completely understood your requirements. Please let me know if there's anything I need to change!
There's also a conflict: https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/pull/1521/conflicts. Do I have the permission to resolve it?
@yuanning6: The following test failed, say /retest
to rerun all failed tests or /retest-required
to rerun all mandatory failed tests:
Test name | Commit | Details | Required | Rerun command |
---|---|---|---|---|
pull-cluster-api-provider-ccm-image | db52cded47b760123471ca411a38963851e45aea | link | true | /test pull-cluster-api-provider-ccm-image |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
Hi @Prajyot-Parab , hope you had a great holiday!
I updated my branch to make it keep up with the main branch, but there's still the conflict. And After updating, it shows I want to merge 40 commits into main, I'm not sure whether something went wrong or not... t-t
Could you please give me some guidance? Thank you!!
Hi @Prajyot-Parab , hope you had a great holiday!
I updated my branch to make it keep up with the main branch, but there's still the conflict. And After updating, it shows I want to merge 40 commits into main, I'm not sure whether something went wrong or not... t-t
Could you please give me some guidance? Thank you!!
Step 1 - You should be on your commit
Step 2 - Fetch latest upstream code git fetch upstream
Step 3 - Rebase your branch with upstream/main git rebase upstream/main
Step 4 (Only incase of conflicts) - Fix conflicts if any, git add
fixed files, git rebase --continue
Step 5 - Push code to your brach on forked repo git push origin main --force
Hi @Prajyot-Parab , I followed your instruction, it worked! Thank you so much! I would be very grateful if you could take a look at the code at your convenience. :))
PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
@yuanning6 any update on this one.
@Prajyot-Parab Sorry I'm a bit busy these days, will look into it next week!
Hi @Prajyot-Parab !
I made another PR: https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/pull/1727 (because I messed up with commits in the previous one...). This one has the targets to run yamllint outputting warnings level problems or not outputting.
Please let me know if any improvements are needed!
/close in favor of #1727
/close
@Prajyot-Parab: Closed this PR.
In response to this:
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.