<commit_before>﻿// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#nullable disable

using System;
using System.Collections.Immutable;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.PooledObjects;

namespace Microsoft.CodeAnalysis.Diagnostics.CSharp
{
    /// <summary>
    /// DiagnosticAnalyzer for C# compiler's syntax/semantic/compilation diagnostics.
    /// </summary>
    [DiagnosticAnalyzer(LanguageNames.CSharp)]
    internal sealed class CSharpCompilerDiagnosticAnalyzer : CompilerDiagnosticAnalyzer
    {
        internal override CommonMessageProvider MessageProvider
        {
            get
            {
                return CodeAnalysis.CSharp.MessageProvider.Instance;
            }
        }

        internal override ImmutableArray<int> GetSupportedErrorCodes()
        {
            var errorCodes = Enum.GetValues(typeof(ErrorCode));
            var builder = ArrayBuilder<int>.GetInstance(errorCodes.Length);
            foreach (ErrorCode errorCode in errorCodes)
            {
                // Compiler diagnostic analyzer does not support build-only diagnostics.
                if (!ErrorFacts.IsBuildOnlyDiagnostic(errorCode) &&
                    errorCode is not ErrorCode.Void or ErrorCode.Unknown)
                {
                    builder.Add((int)errorCode);
                }
            }

            return builder.ToImmutableAndFree();
        }
    }
}<commit_msg>Fix test failures<commit_after>﻿// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#nullable disable

using System;
using System.Collections.Immutable;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.PooledObjects;

namespace Microsoft.CodeAnalysis.Diagnostics.CSharp
{
    /// <summary>
    /// DiagnosticAnalyzer for C# compiler's syntax/semantic/compilation diagnostics.
    /// </summary>
    [DiagnosticAnalyzer(LanguageNames.CSharp)]
    internal sealed class CSharpCompilerDiagnosticAnalyzer : CompilerDiagnosticAnalyzer
    {
        internal override CommonMessageProvider MessageProvider
        {
            get
            {
                return CodeAnalysis.CSharp.MessageProvider.Instance;
            }
        }

        internal override ImmutableArray<int> GetSupportedErrorCodes()
        {
            var errorCodes = Enum.GetValues(typeof(ErrorCode));
            var builder = ArrayBuilder<int>.GetInstance(errorCodes.Length);
            foreach (ErrorCode errorCode in errorCodes)
            {
                // Compiler diagnostic analyzer does not support build-only diagnostics.
                if (!ErrorFacts.IsBuildOnlyDiagnostic(errorCode) &&
                    errorCode is not (ErrorCode.Void or ErrorCode.Unknown))
                {
                    builder.Add((int)errorCode);
                }
            }

            return builder.ToImmutableAndFree();
        }
    }
}
{'fraction_non_alphanumeric': 0.07421383647798742, 'fraction_numerical': 0.0, 'mean_word_length': 2.2895553257497414, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5398751', 'n_tokens_mistral': 771, 'n_tokens_neox': 750, 'n_words': 204}