Skip to content

Conversation

@ADITYATIWARI342005
Copy link
Contributor

What type of PR is this?

chore: implement go-prettier for yaml files and remove yanllint

What this PR does / why we need it:
removes yamllint and implements go-pretter lint instead of it.

Which issue(s) this PR fixes:

Fixes #7147

Release Notes: Yes/No

@ADITYATIWARI342005 ADITYATIWARI342005 requested a review from a team as a code owner November 3, 2025 10:37
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.37%. Comparing base (2ec695d) to head (42257c7).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7416      +/-   ##
==========================================
- Coverage   72.38%   72.37%   -0.01%     
==========================================
  Files         231      231              
  Lines       34039    34043       +4     
==========================================
+ Hits        24639    24640       +1     
- Misses       7626     7630       +4     
+ Partials     1774     1773       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

… the make target to call prettier instead of go-prettier

Signed-off-by: ADITYATIWARI342005 <[email protected]>
…check-format-yaml target that runs prettier in check mode on tracked YAML files, and update the CI workflow to use the check target

Signed-off-by: ADITYATIWARI342005 <[email protected]>
…nstead of ), and modify the GitHub Actions workflow to install prettier with go install and ensure the Go bin path is added

Signed-off-by: ADITYATIWARI342005 <[email protected]>
@ADITYATIWARI342005 ADITYATIWARI342005 force-pushed the implement-prettier-lint branch 3 times, most recently from 184f678 to af2a1ce Compare November 3, 2025 17:36
@ADITYATIWARI342005
Copy link
Contributor Author

Hi @zirain
I am done with the implementation, and it passes all the CI checks !
Please review it and suggest changes especially in the .prettierignore file.

Thank you.

steps:
- shell: bash
run: sudo apt-get install libbtrfs-dev -y
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v5.0.1
Copy link
Member

Choose a reason for hiding this comment

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

why this changed? I recalled this's required somewhere? two blank spaces before comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe it is from the automated prettier-yaml formatting as I do not remember making this change.

…all the correct go-prettier binary using a valid tag by switching to @latest, ensuring the formatter is available during CI

Signed-off-by: ADITYATIWARI342005 <[email protected]>
… existing composite action

Signed-off-by: ADITYA TIWARI <[email protected]>
Copy link
Member

Choose a reason for hiding this comment

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

it's fine to set up a excudle rule for files under this folder.

@ADITYATIWARI342005
Copy link
Contributor Author

why this changed? I recalled this's required somewhere? two blank spaces before comment.

@zirain
It would be good if you would clarify on how should I fix this
a) add this file to .prettierignore
b) only restore the unintentional change

I am confused about the fix, please help me !

Thank you.

@ADITYATIWARI342005
Copy link
Contributor Author

Hi @zirain
All the CI checks were passing until I added release-notes to .prettierignore.
I believe the PR has no concerning issues left except for the unintentional line edit from prettierlint, since addition of a filetype to .prettierignore is not a breaking change.
Please review the Pull Request.

Thank you.

@ADITYATIWARI342005
Copy link
Contributor Author

Hi @zirain
the PR is ready for review, all CI checks have passed successfully

why this changed? I recalled this's required somewhere? two blank spaces before comment.

@zirain It would be good if you would clarify on how should I fix this a) add this file to .prettierignore b) only restore the unintentional change

I am confused about the fix, please help me !

Please help me with this.

.prettierignore Outdated
**/.examples/**
**/test/**
**/.test/**
tools/linter/golangci-lint/.golangci.yml
Copy link
Member

Choose a reason for hiding this comment

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

since we ignore .github/workflow, it's fine to add tools/github_actions

@zirain
Copy link
Member

zirain commented Nov 6, 2025

@ADITYATIWARI342005 thanks for your patient, can you revert all the changes under release-notes folder.

.prettierignore Outdated
**/.examples/**
**/test/**
**/.test/**
tools/linter/golangci-lint/.golangci.yml
Copy link
Member

Choose a reason for hiding this comment

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

why remove the prev value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as other to satisfy gen-check

@ADITYATIWARI342005
Copy link
Contributor Author

Hi @zirain this was the log on running the lint tool, it failed on these files

Failed on .examples/redis/redis.yaml
Failed on .examples/simple-extension-server/simple-extension-server.yaml
Failed on .examples/kubernetes/zone-aware-routing.yaml
Failed on .examples/kubernetes/tcp-routing.yaml
Failed on .examples/kubernetes/ext-auth-grpc-service.yaml
Failed on .examples/kubernetes/http-routing.yaml
Failed on .examples/kubernetes/grpc-routing.yaml
Failed on .examples/kubernetes/quickstart.yaml
Failed on .examples/kubernetes/mergepatch.yaml
Failed on .examples/kubernetes/ext-auth-http-service.yaml
Failed on .examples/kubernetes/gateway-namespace-mode.yaml
Failed on .examples/kubernetes/ext-proc-grpc-service.yaml
Failed on .examples/kubernetes/accesslog/json-accesslog.yaml
Failed on .examples/kubernetes/accesslog/als-accesslog.yaml
Failed on .examples/kubernetes/accesslog/multi-sinks.yaml
Failed on .examples/kubernetes/accesslog/otel-accesslog.yaml
Failed on .examples/kubernetes/accesslog/text-accesslog.yaml
Failed on .examples/kubernetes/metric/otel-sink.yaml
Failed on .examples/kubernetes/envoy-proxy-config.yaml
Failed on .examples/kubernetes/tracing/zipkin.yaml
Failed on .examples/kubernetes/tracing/default.yaml
Failed on .examples/kubernetes/udp-routing-example-backend.yaml
Failed on .examples/kubernetes/tls-termination.yaml
Failed on .examples/kubernetes/merged-gateways.yaml
Failed on .examples/kubernetes/tls-passthrough.yaml
Failed on .examples/kubernetes/application.yaml
Failed on .examples/static-file-server/manifests/tls.yaml
Failed on .test/benchmark/config/nighthawk-test-server-config.yaml
Failed on .test/benchmark/config/nighthawk-test-server.yaml
Failed on .test/benchmark/config/gatewayclass.yaml
Failed on .test/e2e/base/manifests.yaml
Failed on .test/e2e/upgrade/manifests.yaml
Failed on .test/config/gatewayclass.yaml
Failed on .toolslinter/golangci-lint.golangci.yml

What should I do for these?

.vscode/

# exclude release-notes
release-notes/*
Copy link
Member

Choose a reason for hiding this comment

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

can you revert all the changes under release-notes because we excluded them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: format yaml with go-prettier and remove yamllint

2 participants