Ejemplo n.º 1
0
        internal static bool IsLogdumpLike
            (
            this Issue target,
            int line,
            int column,
            int lineEnd,
            int columnEnd,
            IssueId issueId,
            string expectedText)
        {
            if(target.IssueId != issueId)
                return false;

            var logDump = target.LogDump;

            var pattern = Pattern.ReplaceArgs(line, column, lineEnd, columnEnd, issueId);
            var match = pattern.Box().Find;

            var start = match.Apply(logDump);
            if(start == null)
                return false;

            var logText = logDump.Substring(start.Value);
            if (logText.StartsWith(expectedText))
                return true;

            return false;
        }
Ejemplo n.º 2
0
 protected override IssueType CreateIssue(Syntax source, IssueId issueId)
     => new ConsequentialIssueType(this, source);