-
Notifications
You must be signed in to change notification settings - Fork 21
style(generator): format on the CI APIC-415 #342
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
Conversation
✅ Deploy Preview for api-clients-automation canceled.
|
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
Not sure if it's done for testing purposes, but it would make sense to run it locally first :D |
Yes I was just testing to see if having the wrong format would throw :) |
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.
Non blocking comment, it looks nice!
diff=$(git status --porcelain ./generators | wc -l) | ||
if [[ $diff > 0 ]]; then | ||
echo "Format the generators folder by running 'yarn docker format java generators'" | ||
fi | ||
exit $diff |
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.
This could be the ultimate step of this job, with the same thing we do for the CTS
- name: Check diff with pushed code
run: |
git --no-pager diff
exit $(git status --porcelain | wc -l)
So we know what's the diff and can debug, wdyt?
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.
As it's not something you can debug by hand file by file I don't think it matters, the only solution is to run the provided command, which will affect every files.
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.
My comment was more about splitting logic but anyway it's not a big deal here, I'm fine with that
🧭 What and Why
🎟 JIRA Ticket: APIC-415
Expose the
formatter
function through the cli, and use it on thegenerators
🧪 Test
yarn docker format java generators