mununki/gqlmerge

Add more indents

3timeslazy opened this issue · 10 comments

I think it would be useful to allow users to select indents in the generated scheme, so as not to violate the company's rules.

It can be like this:

# t for tab
# {n}s - amount of spaces
gqlmerge --ident=t (or 2s, 4s) PATH OUTPUT

Ready to make PR, if needed

Good idea, why not?

Let's list possible options for this.

  • t (tab)
  • 2
  • 4

or just --indent={any integer}

In case of 2, 4, I don't think it is needed s after number of space. What do you think?

@mattdamon108 I think the follow pattern will be good:

# n - amount of idents
# i - ident (`t` for tabs and `s` for spaces)
--ident={n}{i}

if n is not stated 1 will be used

--ident=t is equal to --ident=1t

I agree on your idea. If you're willing to make a PR, let me know or I'll work on it.

@mattdamon108 i will

@3timeslazy on 🔥 👍

@mattdamon108 Hey! Review PR pls #19

@3timeslazy Thank your for your work! Sure thing, I'll review it.

@3timeslazy there is some bug when it runs with options e.g. gqlmerge -v. It is caused by -v or -h is not parsed by flag. So I PR after fixed. And I kept Merge(indent, paths) in /lib to use it inside other prjects as a library. Please check it out in lastest version.