• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vektah / gqlparser / 565
87%

Build:
DEFAULT BRANCH: master
Ran 17 Jul 2023 11:45AM UTC
Jobs 1
Files 55
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Jul 2023 11:44AM UTC coverage: 88.738% (+0.1%) from 88.607%
565

push

circle-ci

web-flow
Put comments behind an option in formatter (#271)

* Put comments behind an option in formatter

In #263, we introduced parsing of comments, as well as support for them
in the formatter. In some cases this is surely useful, but in others
it's just bloat. (And as I describe in Khan/genqlient#282, it may even
be a problem in some cases which depended on the fact that formatting
the query didn't include comments.)

In this commit I introduce an option to control whether comments are
formatted. I set the default to false (i.e. restoring the previous
behavior if no options are set), because adding this felt to me
like a breaking change, and because it seems to me like the more common
usage. `WithComments()` restores the behavior added in #263. If others
disagree I'm happy to keep the changed default, and instead provide
`WithoutComments()`. I also added tests both ways (and for the existing
`WithIndent()` option), and checked that the `comments` tests match the
existing ones, and the `default` tests match those from `v2.6.3` (except
for the addition of a few descriptions whose omission seem to have been
a bug).

Comments are still parsed in any case, as adding new struct fields is no
problem; and they are still included in `Dump` since that seems
obviously parallel to struct fields and is more of a debugging thing.

* docs

6 of 6 new or added lines in 1 file covered. (100.0%)

4373 of 4928 relevant lines covered (88.74%)

1.04 hits per line

Jobs
ID Job ID Ran Files Coverage
1 565.1 17 Jul 2023 11:45AM UTC 55
88.74
Source Files on build 565
  • Tree
  • List 55
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 8d1bedc7 on github
  • Prev Build on master (#563)
  • Next Build on master (#571)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc