Pipeline should fail if the code violates the .editorConfig file

Hello, I do have an editorConfig which works fine. Inside my IDE, if I violates the rules from that editorConfig, I received an error when building. I am expecting that If I still want to push this code, the pipeline should fail as well but unfortunately, it still pass. How do I make that the pipeline will failed if the code violates my rules.

Thank you