How to define lint for my own language ??

I am using codemirror and I define my own language and I see lint defined for javascripts and other languages … can I define lint for my own language ?..I have a list of errors and it’s position in codemirror .
what I want to do : is to make line_error under this errors and when the user hover on error show to him what description of error using my own lint .
This is the lint for javascripts :slight_smile:

      var warnings = [ [ "Expected '{'",
                         "Statement body should be inside '{ }' braces." ] ];

      var errors = [ "Missing semicolon", "Extra comma", "Missing property name",
                     "Unmatched ", " and instead saw", " is not defined",
                     "Unclosed string", "Stopping, unable to continue" ]; 

so I can define my own errors here ,But I did not knew How to attach every error with it’s position in codemirror
Note:
I have the list of my errors and it’s position in codemirror But I did not knew how to define my own lint (where I can attach every error with it’s position in codemirror) ??