Skip to content

Conversation

@ammokhov
Copy link
Contributor

Issue #, if available:

Description of changes:

IntelliJ Plugin for Resource Schema Guard Rail

Overview

IntelliJ plugin that provides real-time validation for CloudFormation resource schema files using the Resource Schema Guard Rail CLI tool.

Features

1. Stateless Linter (Automatic)

  • Real-time validation as you edit JSON schema files
  • Inline error highlighting with detailed tooltips showing rule violations
  • Problems tool window integration for easy navigation to issues
  • Status bar widget displaying error and warning counts
  • Runs automatically on file save using guard-rail --schema file://path --json

2. Stateful Validation (Manual)

  • Gutter icon ("Run Checks" button) at line 1 of JSON schemas
  • Compares local schema with CloudFormation-registered schema
  • Fetches registered schema via CloudFormation DescribeType API using typeName from local file
  • Runs guard-rail --schema file://retrieved --schema file://local --stateful --format
  • Output panel displays formatted validation results with breaking change detection
  • Saves temporary files and logs in project directory

Architecture

  • GuardRailAnnotator: External annotator for real-time diagnostics
  • GuardRailCliExecutor: Centralized CLI execution with executeStateless() and executeStateful() methods
  • GuardRailGutterIconProvider: Clickable gutter icon for stateful validation
  • CloudFormationSchemaFetcher: Retrieves registered schemas from AWS

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ammokhov ammokhov self-assigned this Nov 23, 2025
@ammokhov ammokhov added the enhancement New feature or request label Nov 23, 2025
kddejong
kddejong previously approved these changes Nov 24, 2025

// Map results to diagnostics using functional approach
val diagnostics = results.flatMap { validationResult ->
diagnosticMapper.mapResults(buildJsonOutput(validationResult), psiFile)
Copy link
Contributor

@pultormi pultormi Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit odd. Seems like in buildJsonOutput we serialize this back into a json string then in mapResults we deserialize it back to a guard rail result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants