Sad Tux - Windows bias detected
This page contains Windows bias

About This Page

This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.

Bias Analysis

Detected Bias Types
powershell_heavy
windows_first
missing_linux_example
windows_tools
Summary
The documentation page demonstrates a strong Windows bias. All code examples are in C# and use Windows-style commands (e.g., 'cmd /v:ON /c'), with no Linux shell equivalents provided. File paths use backslashes by default, with only a brief note for Linux users to change slashes. The only sample project is a Visual Studio solution for .NET, and all tooling references (e.g., NuGet, Visual Studio) are Windows-centric. There are no Linux or cross-platform code samples, nor are there instructions for using Linux tools or SDKs. The documentation also refers to Windows tools and patterns first and exclusively.
Recommendations
  • Provide equivalent Linux shell (bash) command examples for task commands, alongside the Windows 'cmd' examples.
  • Include code samples in additional languages commonly used on Linux (e.g., Python, Java), and demonstrate use of the Azure SDK for these languages.
  • Show file path examples using both Windows (backslash) and Linux (forward slash) conventions, not just a note.
  • Offer instructions for using cross-platform editors (e.g., VS Code) and package managers (e.g., pip for Python, Maven for Java) in addition to Visual Studio and NuGet.
  • Add a Linux-based sample project or instructions for running the sample on Linux, including any required setup.
  • Explicitly mention and demonstrate how to use the Batch service API from Linux environments, not just Windows.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-01-12 00:00 #99 completed Biased Biased
2026-01-11 06:20 #98 completed Biased Biased
2026-01-10 00:00 #92 completed Clean Clean
2026-01-06 22:28 #78 completed Clean Clean
2025-12-29 18:00 #48 cancelled Biased Biased
2025-12-15 00:00 #7 completed Clean Clean
2025-12-14 05:05 #6 completed Clean Clean

Flagged Code Snippets

new CloudTask(taskId, "cmd /v:ON /c \"echo off && set && (FOR /L %i IN (1,1,100000) DO (ECHO !RANDOM!)) > output.txt\"")
{
    OutputFiles = new List<OutputFile>
    {
        new OutputFile(
            filePattern: @"..\std*.txt",
            destination: new OutputFileDestination(
         new OutputFileBlobContainerDestination(
                    containerUrl: containerSasUrl,
                    path: taskId)),
            uploadOptions: new OutputFileUploadOptions(
            uploadCondition: OutputFileUploadCondition.TaskCompletion)),
        new OutputFile(
            filePattern: @"output.txt",
            destination: 
         new OutputFileDestination(new OutputFileBlobContainerDestination(
                    containerUrl: containerSasUrl,
                    path: taskId + @"\output.txt")),
            uploadOptions: new OutputFileUploadOptions(
            uploadCondition: OutputFileUploadCondition.TaskCompletion)),
}
CloudBlobContainer container = storageAccount.CreateCloudBlobClient().GetContainerReference(containerName);
await container.CreateIfNotExists();

new CloudTask(taskId, "cmd /v:ON /c \"echo off && set && (FOR /L %i IN (1,1,100000) DO (ECHO !RANDOM!)) > output.txt\"")
{
    OutputFiles = new List<OutputFile>
    {
        new OutputFile(
            filePattern: @"..\std*.txt",
            destination: new OutputFileDestination(
         new OutputFileBlobContainerDestination(
                    containerUrl: container.Uri,
                    path: taskId,
                    identityReference: new ComputeNodeIdentityReference() { ResourceId = "/subscriptions/SUB/resourceGroups/RG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name"} })),
            uploadOptions: new OutputFileUploadOptions(
            uploadCondition: OutputFileUploadCondition.TaskCompletion))
    }
}