py-psscriptanalyzer

Contents

  • Installation
    • Prerequisites
      • Python
      • PowerShell
        • Windows
        • macOS
        • Linux
      • Verify PowerShell Installation
    • Installing py-psscriptanalyzer
      • Method 1: PyPI (Recommended)
      • Method 2: From Source
      • Verify Installation
    • Using as Pre-commit Hook
      • Method 1: Add to Existing .pre-commit-config.yaml
      • Method 2: Create New .pre-commit-config.yaml
      • Install and Run Pre-commit
    • Development Installation
    • Troubleshooting
      • PowerShell Not Found
      • PSScriptAnalyzer Module Missing
      • Permission Issues
  • Usage
    • Command Line Usage
      • Basic Command Line
      • Command Line Options
      • Severity Levels
      • Environment Variables
      • Examples
        • Basic Analysis
        • Rule Category Filtering
        • Include/Exclude Specific Rules
        • Output Formats
        • Recursive File Search
        • Code Formatting
    • Pre-commit Hook Usage
      • Available Hooks
      • Automatic Execution
      • Manual Execution
        • Run All Hooks
        • Run Specific Hooks
      • Hook Configuration
    • File Types
    • Output Examples
      • Analysis Output
      • Format Output
      • Success Output
    • Integration Examples
      • GitHub Actions
        • Basic Analysis
        • With SARIF for GitHub Code Scanning
      • Azure Pipelines
    • Best Practices
      • Development Workflow
      • Continuous Integration
      • Team Usage
    • Quick Reference
      • Command Line Options
      • Rule Category Filters
      • Rule Selection Options
      • Output Format Options
      • Severity Levels
      • Environment Variables
      • Common Commands
      • Team Best Practices
  • Configuration
    • Pre-commit Hook Configuration
      • Basic Configuration
      • Severity Levels
      • Environment Variables
      • Rule Category Filtering
      • Include/Exclude Rules
      • Output Format Options
      • Recursive File Processing
      • CI/CD Integration
        • GitHub Actions Example
        • Azure DevOps Example
      • File Patterns
      • Excluding Files
      • Advanced Configuration Examples
        • Separate Analysis and Formatting
        • Advanced Configuration with New Features
        • Integration with Other Hooks
    • PSScriptAnalyzer Configuration
      • PowerShell Profile Configuration
        • Example Settings File
      • Environment Variables
    • CI/CD Configuration
      • GitHub Actions
      • Azure DevOps
    • Best Practices
      • Repository Setup
      • Team Workflow
      • Performance Optimization
  • Development
    • Setting Up Development Environment
      • Prerequisites
      • Clone and Setup
      • Verify Installation
    • Project Structure
    • Development Workflow
      • 1. Create Feature Branch
      • 2. Make Changes
      • 3. Test Your Changes
      • 4. Test CLI Integration
      • 5. Update Documentation
      • 6. Submit Pull Request
    • Testing
      • Running Tests
      • Writing Tests
        • Unit Test Example
      • Integration Tests
    • Code Style and Quality
      • Code Formatting
      • Type Checking
      • Pre-commit Hooks
    • Documentation
      • Building Documentation
      • Writing Documentation
        • Docstring Style
    • Release Process
      • Version Management
      • Creating a Release
      • Publishing to PyPI
    • Contributing Guidelines
      • Pull Request Process
      • Commit Messages
      • Code Review
    • Debugging
      • Common Development Issues
        • PowerShell Not Found
        • PSScriptAnalyzer Module Issues
        • Test Failures
      • Logging and Debugging
  • API Reference
    • py-psscriptanalyzer Module
      • Main Module Functions
        • main(argv=None)
        • run_script_analyzer(files, format_mode=False, severity='All')
    • Core Module (py_psscriptanalyzer.core)
      • Functions
        • parse_arguments(args)
        • filter_powershell_files(files)
    • PowerShell Module (py_psscriptanalyzer.powershell)
      • Functions
        • find_powershell()
        • check_psscriptanalyzer_installed(powershell_exe)
        • install_psscriptanalyzer(powershell_exe)
    • Scripts Module (py_psscriptanalyzer.scripts)
      • Functions
        • build_powershell_file_array(files)
        • escape_powershell_path(path)
        • generate_analysis_script(files, severity)
        • generate_format_script(files)
    • Constants Module (py_psscriptanalyzer.constants)
      • Constants
        • POWERSHELL_EXECUTABLES
        • POWERSHELL_FILE_EXTENSIONS
        • SEVERITY_LEVELS
        • ANALYSIS_TIMEOUT
    • Error Handling
      • PowerShell Not Found
      • PSScriptAnalyzer Module Missing
    • Type Hints
    • Compatibility
  • Change Log
  • Change Log
    • [Unreleased]
    • [0.3.1] - 2025-08-14
      • Fixed
    • [0.3.0] - 2025-08-12
      • Added
    • [0.2.0] - 2025-08-11
      • Added
      • Changed
      • Fixed
    • [0.1.0] - 2025-08-11
      • Added
      • Technical Features
      • Documentation
      • Package Management
      • Command Line Interface
      • Quality Assurance
py-psscriptanalyzer
  • Search


© Copyright 2025, Chris McQuaid.

Built with Sphinx using a theme provided by Read the Docs.