Invalid config, incorrect rows when using multiple files

I have tried to split up my configurations in multiple files which I then include into my main configuration.yaml

The problem I have noticed, and i havent thought of it before so maybe its a new thing.
If I have a config error the log file will point to the configuration.yaml file with the row of my !include statement.
This means if my included file is 200lines big I have no idea where to look.

I dont remember having this issue before

Any ideas how to get the correct file and row? or do I just have to live with it?

Read the error message for what the actual error is, and then search for the offending issue in the file.

Example…

Invalid config for [automation]: [minutes] is an invalid option for [automation]. Check: automation->trigger->0->minutes. (See /config/configuration.yaml, line 286). Please check the docs at https://home-assistant.io/components/automation/

It tells you that the problem is that the key minutes is invalid.

Press ctrl+F (or whatever ‘find’ is in your editor), search for minutes, work out what’s wrong.

The problem is that the error msg doesnt give much hints:
Invalid config for [automation]: not a valid value for dictionary value @ data[‘action’][0][‘entity_id’]. Got None. (See /config/configuration.yaml, line 23). Please check the docs at https://home-assistant.io/components/automation/

I have 9 different automation files and about 50-100 lines in each

… And at least one of them is lacking an entity_id for a service call.

No shit sherlock.

My question wasnt related to what kind of error I had, it was about easier finding file and row.

Yes, use the error message and the find function of your text editor to locate the problem. Like I said in my first reply.

If your real question is ‘can I split my files and still have the error checker hand me everything on a plate’, the answer is no, because all your split off files effectively get merged back in to one for homeassistant to read before it starts so the line numbers are never going to be correct. That’s why you either get the line number of the include, or just a question mark.