You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading the exceptions.json file, I was reading "!ignore" as "not ignore" which really didn't make sense 😄 Even reading the docs on it didn't really clarify it for me.
I would suggest changing the way these are marked up to avoid this confusion.
Thinking out loud (and not having a picture of where you want to take this), I wonder if having a "traits" or "flags" or "attributes" field that allows for multiple boolean things would make sense? Something like:
"traits": "trait1, trait2, ignore"
Maybe then "!" can actually become "not":
"traits": "comment, ignore"
vs.
"traits": "!comment, ignore"
This would allow for future expansion of this kind of thing without adding new fields for each.
The text was updated successfully, but these errors were encountered:
(Now that I see you can have both "comment" and "!comment" in the same block, my example doesn't make as much sense...)
"Can have" doesn't mean too much, because the format grew organically during development based on the needs of the moment, not according to a well thought out plan. I wanted to document what was going on in the file, and had to deal with JSON not having any way to add comments to the format, while also being able to add comments that go into the generated code.
I like the traits concept and it is analogous to struct tags in Go, but it leads down the path of meta-programming and might be an unnecessary level of indirection.
(From short discussion in this issue.)
When reading the exceptions.json file, I was reading "!ignore" as "not ignore" which really didn't make sense 😄 Even reading the docs on it didn't really clarify it for me.
I would suggest changing the way these are marked up to avoid this confusion.
Thinking out loud (and not having a picture of where you want to take this), I wonder if having a "traits" or "flags" or "attributes" field that allows for multiple boolean things would make sense? Something like:
Maybe then "!" can actually become "not":
vs.
This would allow for future expansion of this kind of thing without adding new fields for each.
The text was updated successfully, but these errors were encountered: