Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't throw an exception when a field is missing #17203
This is exactly what is happening here. Maybe the title is a bit misleading but if you read the actual code you'll see that the utility overwrites
I am not sure what our alternative here is. As I told you already on IRC, we can't simply try-catch the error during the lint run (or crash without catching), since that would abort the rule parsing. (This is exactly what @chrisf wanted to prevent when he introduced this change way back in 5d1ee14!)
However, since both you and @GraionDilach completely misunderstood the code and changes here after giving them a quick look, I'd suggest making what is going on in
to something like
That way it becomes more obvious that only the linter is omitting the exception. The added null checks will have to stay then though.