Open nicola-lunghi opened 1 year ago
Thank you for the feature idea.
Any updates?
@0dminnimda , we did not have a chance to get to this request but after we release 0.7 we will try to look at all "Language Service" work items, triage and cost them. There is demand from the community. In the mean time, @0dminnimda and @nicola-lunghi, if you'd like, you could describe more about what you'd like to see with this makefile formatter. Is this only spacing/tabbing related?
Is this only spacing/tabbing related?
I could add that it would be also nice to see formatting for macros, like
ifeq ($(QUEUE), vector)
$(info INFO: using vector implementation of queue (QUEUE=$(QUEUE)))
override CFLAGS += -D QUEUE_IMPL=\'V\'
else
$(info INFO: using list implementation of queue (QUEUE=$(QUEUE)))
endif
Pleaseeeee
@nicola-lunghi @0dminnimda @trumanpurnell
Circling back to this, because I wanted to get more context on the request for a formatter. What would you expect a formatter to do for a Makefile?
Since the syntax for a Makefile is actually somewhat rather free form (as long as it adheres to a certain set of rules), there isn't a great way to control the formatting many of the rules, though it is possible for some things, like if statements, etc. (For context, I was doing some initial investigation and came upon this post that has some similar questions and thoughts).
Any feedback would be great!
The biggest pain point would be to make sure all the indentations are tabs since makefile can throw not very intuitive error messages if the format is not correct. Indentation on if statments and that's probably it. ALso the question you mentioned seems to be good example.
+1 for this FR!
Hi sorry @gcampbell-msft I missed the reply
At the moment I would like something simple that removed double lines, remove spaces at the end of the line, format comment with a space before the '#' and maybe checks for tabs/spaces/double tabs???
Thank you
Also, ensure that PHONY has a dot (.) before and a colon (:) after. Simple things I guess.
see title