#(LeafyMitsuwa) VSCode - add detection for Duplicate Keys

24 messages · Page 1 of 1 (latest)

coarse grove
#

Could we perhaps get line information on YAML duplicate key errors?
It recognizes that there is a duplicate key, so, in future, I'd rather not go through thousands of entries to find 1, or 2 copy-paste errors.

Example Script:

Example_Data:
    type: data
    1:
        1:
            1: Sub-key Value 1
            2: Sub-key Value 2
            1: Sub-key Value 3
        2: Sub-Key 2
        1: Sub-Key 3
    2: Key 2
    1: Key 3
radiant saffronBOT
#

(LeafyMitsuwa) Duplicate YAML Keys

#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

coarse grove
#

I'd settle for red highlighting as well, both at the key, and to the side as a general indicator.

rustic granite
#

I realize this isn't related to your question, but remember the power of a binary search

#

there's no need to go through each entry individually

#

copy half the script to your clipboard then delete it

#

if the error still remains, it's in the other half

#

so on and so forth

coarse grove
#

I had a duplicate copy paste error in different sections. Eliminating 1 branch didn't resolve it, unfortunately in my case. Never the less, I had tried it, and is a good suggestion.

sonic valleyBOT
#
Changed to Feature

Thread is now a Feature thread. This indicates a request for a new feature to the plugin, that both (A) does not already exist and (B) reasonably can be added. If you are unsure whether this applies, use </helpthread:1028674284870180883> to change back to a normal help thread.

flat silo
#

(LeafyMitsuwa) VSCode - add detection for Duplicate Keys

#

the YAML error is on the wrong line because yamldotnet refuses to bother providing information on that error

#

will need to add a separate error check for that

flat silo
#

YAML has proper error line numbers now, this will be fixed in vs code ext 1.4.6

sonic valleyBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@coarse grove