Odin icon indicating copy to clipboard operation
Odin copied to clipboard

Add flags to show/export defineable values and warn if a -define is unused in the project

Open laytan opened this issue 1 year ago • 2 comments

laytan avatar Jan 25 '24 01:01 laytan

-show-defines and -export-defines?:)

DragosPopse avatar Jan 25 '24 16:01 DragosPopse

To me, a define is something that is defined, and a defineable something you can define. I do agree it is not a very ergonomic name though.

laytan avatar Jan 25 '24 16:01 laytan

I've rebased and improved the PR. Now it also collects doc comments tied to the declaration if available, this also needed a change to the way it is shown because those can be multiline.

Here is what it looks like now when I added -show-defineables to a odin test invocation: Screenshot 2024-06-07 at 14 54 30

I am open to ideas to improve that.

And maybe the name should be -show-defineable instead of with the s added, or an entirely different name?

laytan avatar Jun 07 '24 13:06 laytan

And maybe the name should be -show-defineable instead of with the s added, or an entirely different name?

-show-config?

I only just now became aware of this PR, otherwise I would've chimed in earlier. This is a nice feature though.

Feoramund avatar Jun 20 '24 14:06 Feoramund