PowerShell Practice and Style
  • Introduction
    • About this Guide
    • Contributing
  • Style Guide
    • Introduction
    • Code Layout and Formatting
    • Function Structure
    • Documentation and Comments
    • Readability
    • Naming Conventions
  • Best Practices
    • Introduction
    • Naming Conventions
    • Building Reusable Tools
    • Output and Formatting
    • Error Handling
    • Performance
    • Security
    • Language, Interop and .NET
    • Metadata, Versioning, and Packaging
Powered by GitBook
On this page
  • Introduction
  • Table of Contents

Was this helpful?

  1. Style Guide

Introduction

PreviousContributingNextCode Layout and Formatting

Last updated 4 years ago

Was this helpful?

Introduction

In the Python community, developers have a great programming style reference provided as part of the language enhancement process specifications (), but in the PowerShell world there has been no official documentation of community preferences.

This document is an attempt to come to an agreement on a style-guide because we know that the more people follow the same set of code-style habits, the more readable the community's code will be. In other words, although the recommendations of this guide are just recommendations, if you follow them, you will write PowerShell code that is more easily read, understood, and maintained.

Table of Contents

PEP-8
Code Layout and Formatting
Function Structure
Documentation and Comments
Readability
Naming Conventions