Back to all reviewers

File-specific indentation standards

octokit/octokit.net
Based on 2 comments
Json

Maintain consistent indentation based on file type to ensure code readability and prevent unwanted whitespace changes in PRs. Use 4 spaces for C# (.cs) files and 2 spaces for configuration files (like JSON, devcontainer files).

Code Style Json

Reviewer Prompt

Maintain consistent indentation based on file type to ensure code readability and prevent unwanted whitespace changes in PRs. Use 4 spaces for C# (.cs) files and 2 spaces for configuration files (like JSON, devcontainer files).

Example for C# files:

public class Example 
{
    public void Method() 
    {
        if (condition) 
        {
            DoSomething();
        }
    }
}

Example for configuration files:

{
  "name": "Project",
  "settings": {
    "editor.tabSize": 4,
    "editor.insertSpaces": true
  }
}

When working in different editors, ensure your editor settings reflect these standards. Configure IDE settings on a per-language basis (e.g., in VSCode settings.json) to automatically apply the correct indentation for each file type. This prevents accidental reformatting and maintains consistency throughout the codebase.

2
Comments Analyzed
Json
Primary Language
Code Style
Category

Source Discussions