Skip to content
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

ci: add yamllint rules #1666

Merged
merged 11 commits into from
Mar 3, 2023
Merged

ci: add yamllint rules #1666

merged 11 commits into from
Mar 3, 2023

Conversation

sakulali
Copy link
Contributor

@sakulali sakulali commented Feb 13, 2023

Type of change:

fix: #1062
Add yamllint rules check samples/deploy/ directory

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Documentation
  • Refactor
  • Chore
  • CI/CD or Tests

What this PR does / why we need it:

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@sakulali
Copy link
Contributor Author

@tao12345666333 PTAL, thanks!
If it need yamllint for CI, refer to https://github.com/marketplace/actions/super-linter, we can merge yamllint action into lint-checker.yml.

.github/workflows/yamllint-checker.yml Outdated Show resolved Hide resolved
.yamllint.yml Outdated
empty-values: disable
float-values: disable
hyphens: enable
indentation: disable # default: enable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why disabled it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tao12345666333 When i enable empty-values or indentation options, i find some error in CI action as shown below, then i use https://www.json2yaml.com/convert-yaml-to-json tool to check yaml file it seems valid, so maybe we can disabled it?
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sakulali we should enable these options and fix the format of YAML. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sakulali we should enable these options and fix the format of YAML. Thanks

@tao12345666333 , Sorry for delay, when i use https://github.com/google/yamlfmt to fix the format of YAML, there are too much differences vs original files, too much change maybe not good?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't worry. It doesn't have any real impact on users.

@codecov-commenter
Copy link

Codecov Report

Merging #1666 (4d57b8b) into master (88d04f2) will increase coverage by 0.40%.
The diff coverage is 61.73%.

❗ Current head 4d57b8b differs from pull request most recent head 6a37796. Consider uploading reports for the commit 6a37796 to get more accurate results

@@            Coverage Diff             @@
##           master    #1666      +/-   ##
==========================================
+ Coverage   41.02%   41.42%   +0.40%     
==========================================
  Files          88       88              
  Lines        7564     7642      +78     
==========================================
+ Hits         3103     3166      +63     
- Misses       4101     4112      +11     
- Partials      360      364       +4     
Impacted Files Coverage Δ
pkg/providers/ingress/ingress.go 4.00% <0.00%> (-0.05%) ⬇️
pkg/providers/ingress/translation/translator.go 0.00% <0.00%> (ø)
pkg/providers/utils/status.go 30.43% <77.77%> (+30.43%) ⬆️
pkg/providers/utils/ingress_status.go 37.50% <84.37%> (+37.50%) ⬆️
cmd/ingress/ingress.go 82.90% <100.00%> (+0.14%) ⬆️
pkg/config/config.go 63.91% <100.00%> (+0.37%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@tao12345666333 tao12345666333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one question

Makefile Show resolved Hide resolved
Copy link
Member

@tao12345666333 tao12345666333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sakulali
Copy link
Contributor Author

sakulali commented Mar 2, 2023

@lingsamuel, @AlinsRan, would you do me a favor to review this pr, thanks!

@lingsamuel lingsamuel merged commit 9df7af6 into apache:master Mar 3, 2023
@sakulali sakulali deleted the yamllint branch March 4, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lint: add yamllint to format yaml files under samples/deploy/ directory
4 participants