I work for about 18 years as a professional software developer in different roles (engineer, lead dev, architect, head of development). I had to leave my last employer because of the pandemic. I am working now as an external dev on a project together with other externals. The lead is much younger than me and doesn't want to take advice from me. He is also rejecting every single line of code I am commiting for made up reasons ("We are not doing that here that way", "Your code looks odd." - not giving any reasoning). Examples:
- I am using a cross join with where clause, he wants an inner join - which is actually the same.
- I am using constructor injection, he wants field injection
He rejects any argument, link and so on.
Also he wants features built in, which are probably never needed and are not ordered by the customer (violating YAGNI), but "may be useful in the future", and is coming up with those at the dailies. He is the only one allowed to review and merge code. (They think this is agile).
Superiors, which are not seeing him working or in the dev meetings, are constantly praising him. He seems also befriended with the other superiors. Other devs are much more calm on that matter and tell me "Oh, thats just the way he is".
This way, the deadline of the project will definitely not hold up and I see it coming, that he will accuse the other developers for it.
His goal is to stay in a good light at the cost of others.
So my question is, how should I deal with him without being the one, who constantly complains? How can I mitigate the situation, once the deadline comes up, that he will finger point to everyone else?