arnetheduck / nph

An opinionated code formatter for Nim
Other
77 stars 12 forks source link

bug: inline comments get automatically removed #47

Closed Ivansete-status closed 4 months ago

Ivansete-status commented 4 months ago

When starting to use nph in nwaku, SP detected that inline comments are being automatically erased.

image

https://github.com/waku-org/nwaku/pull/2396#discussion_r1478370777

  let predicate = proc(record: waku_enr.Record): bool =
    bootnodes.contains(record) or # Temp. Bootnode exception
    (
      # one comment
      record.getCapabilities().len > 0 and   ### THIS COMMENT CAN'T BE ADDED
      nodeShard.shardIds.anyIt(record.containsShard(nodeShard.clusterId, it))
    ) #RFC 64 guideline

Thanks in advance!

SionoiS commented 4 months ago

I guess we'll have to put the comments above now. May be fine if the comments move slightly but not if erased.