Orange-OpenSource / hurl

Hurl, run and test HTTP requests with plain text.
https://hurl.dev
Apache License 2.0
12.56k stars 473 forks source link

hurlfmt check always returns non-zero exit code #2919

Closed jcamiel closed 1 month ago

jcamiel commented 2 months ago

Discussed in https://github.com/Orange-OpenSource/hurl/discussions/2917

Originally posted by **azzamsa** June 13, 2024 Hi, 👋🏽 I am using `hurlfmt 4.3.0` and when running ` hurlfmt tests/api-collection/meta/health.hurl --check` it always gives me non-zero exit status. However `hurlfmt tests/api-collection/meta/health.hurl --in-place` doesn't change or complain about anything. ``````hurl POST {{base_url}} Content-Type: application/json ```graphql { health { status } } ``` HTTP 200 [Asserts] status == 200 jsonpath "$.data.health.status" == "running" `````` ```bash tin on  master [!] is 📦 v1.2.0 via 🦀 v1.78.0 🐡 ❯ hurlfmt tests/api-collection/meta/health.hurl --check tin on  master [!] is 📦 v1.2.0 via 🦀 v1.78.0 🐡 ❯ echo $status 1 ```` Am I missing something? Thanks! 🍜
azzamsa commented 2 months ago

@jcamiel I will take this, I hope I can fix this, as I made a similar feature for my app.

Would you like to point out the lines that I need to play with?

fabricereix commented 2 months ago

Hi @azzamsa, It might not be a good time to touch hurlfmt. We plan to rewrite some parts to align its code with hurl. We will look at your bug afterward.

azzamsa commented 2 months ago

Oh, I see.

Okay, In meantime, I will just remove hurlfmt --check from my CI.

Thank you for hurl. 🍨