public IEnumerable <IFilterableIssue> Filter(IEnumerable <IFilterableIssue> issues)
        {
            if (issues == null)
            {
                throw new ArgumentNullException(nameof(issues));
            }

            var filteredIssues = issues
                                 .Where(i => !issueMatcher.SuppressionExists(i))
                                 .ToArray();

            return(filteredIssues);
        }
        public bool ShouldIssueBeReported(SyntaxTree syntaxTree, Diagnostic diagnostic)
        {
            // This method is called for every analyzer issue that is raised so it should be fast.
            if (!diagnostic.Location.IsInSource &&
                diagnostic.Location != Location.None)
            {
                return(true);
            }

            LiveIssue liveIssue = liveIssueFactory.Create(syntaxTree, diagnostic);

            if (liveIssue == null)
            {
                return(true); // Unable to get the data required to map a Roslyn issue to a SonarQube issue
            }

            var matchFound = !issueMatcher.SuppressionExists(liveIssue);

            return(matchFound);
        }