mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Make GeneratedFileMarker an instance of JavadocElement
This commit is contained in:
committed by
Ian Lynagh
parent
4f256d2958
commit
0e3db78eba
@@ -51,9 +51,9 @@ library class MarkerCommentGeneratedFile extends GeneratedFile {
|
||||
/**
|
||||
* A marker comment that indicates that it is in a generated file.
|
||||
*/
|
||||
private class GeneratedFileMarker extends Top {
|
||||
private class GeneratedFileMarker extends Top instanceof JavadocElement {
|
||||
GeneratedFileMarker() {
|
||||
exists(string msg | msg = this.(JavadocElement).getText() |
|
||||
exists(string msg | msg = this.getText() |
|
||||
msg.regexpMatch("(?i).*\\bGenerated By\\b.*\\bDo not edit\\b.*") or
|
||||
msg.regexpMatch("(?i).*\\bThis (file|class|interface|art[ei]fact) (was|is|(has been)) (?:auto[ -]?)?gener(e?)ated.*") or
|
||||
msg.regexpMatch("(?i).*\\bAny modifications to this file will be lost\\b.*") or
|
||||
|
||||
Reference in New Issue
Block a user