Everyone has noted that "number of lines" is a bad idea. But, at the same time, management wanting an assessment of employees isn't a bad idea. How else do they know who is performing well, which divisions have better talent and so on.
It is true that "someone will try to game the system". But that isn't actually a reason to not have a system. It is a reason to make sure that the system is consistently vetted and it's outcomes measured against the company goals (one of which is probably "make a profit"), and so maybe over time the system needs to be changed. But you still need a system.
So, given you want a system, how do you work out if it is the right system?
You have to realise, before you embark on this, that whatever system you use will produce results, so you have to think "what result do I want".
Once you've worked out that, then you have to work out how to measure the result that you want. And once you've worked that out, you can measure how well your system is performing. At this stage, you will know when/if you need to make changes to the system or not (and if those changes are "good" or not).
So, what are you trying to produce? I mean, you need to make a report, but what is that report going to be used for?
Knowing who is the best, say, HTML developer isn't a really useful piece of info to have. After all, what's the point for management to know this? They can hardly make this person the head of engineering - or a sales person. They just know this person is great at HTML - are they a leader? Are their ideas good? Just knowing "best HTML developer" just means that that person should do HTML - which is probably what they were doing before, so it really doesn't help anyone.
So what you might want to enquire then is why they want to know this. Knowing this will help you work out how to grade the engineers. For example, is it because they're working out bonuses? Then easy, you just find out from all the engineering managers which are their best/ok/worse engineers , and a then you can lump them all into buckets and say "these are all As" and so on, because it's not important as to the intrinsic thing you're measuring, but just that you keep the "best" engineers happy.
That the managers might not know or be playing favourites isn't really the point - because the point is to divvy up the bonus in the best way. And if you start losing engineers that the managers wanted to keep because you divvy'd up the bonus in a different way, then you'll be responsible for explaining why you chose some other metric here, and it won't matter because managers will be screaming that your metric sucks and now they are running late on whatever.
On the other hand, it might be some other idea - maybe they're trying to find the smartest or the best people and try to lift them up for promotion. Then you might do two things - rate your engineers on leadership qualities, or rate them on eagerness to learn.
The first one is pretty nebulous, you just ask the managers to rate their engineers based on leadership skills. You can probably find a book or a website that lists some qualities and how to measure them and then give that to the managers and wait for them to give the reports back. Pretty easy.
The second one is more interesting - if your company offers that training stuff, then you can let it be known that engineers will be rated on what they're learning, and how much, and I'm sure that stuff is kind of measureable. I mean, online training things have assessments and give reports etc etc.
But you'll always have problems with things like this in that it might detract from the company goal (ie at the extreme engineers are learning 40 hours a week and not doing anything), so you've got to consider how to mitigate that (limit learning to some amount a week?), or mix it with something else (lines of code?) or the number of jira tickets that are filled or whatever.
But at the end of the day, you need to work out what you want the result to be of all this, and then devise a system that encourages that result. Given we know very little about you and your workplace, that's really hard to make an answer for.