Carpet

Carpet

2M Downloads

Allowing comments in carpet.conf

altrisi opened this issue ยท 5 comments

commented

I'm ready to add it, but what should be the "keyword"? // or #?

Mostly in the header, since other places it would be more complicated.

commented

# - more standard in conf type situations. Honeslty, I thought it already does #, but I was wrong

commented

I'd prefer //.

commented

I would use #, since in VSCode and Intellij Idea that gets highlighted as a comment in .conf files, whereas // does not.
From what i've seen, most configuration files like .properties also use it, and that has a similar structure to the carpet.conf file.

commented

Good to know. I haven't opened a config file recently so I wasn't aware of what gets detected.

commented

not sure it is valid. carpet.conf is modifyable by the game as well, so even if you keep the comments and their location, if you remove // unset the rule that the comment belongs to, it will be invalid.

I would suggest that the comments make sense only if the settings is locked, in this case config is read-only and comments could just be skipped.

So my tldr is that I woudn't add functionality that adds lots of complexity to satisfy partially some admin-level cravings. Allowing comments in read-only config is something that should be simple enough and fulfill the usecase.