Coder Social home page Coder Social logo

addc-iaas-prototyping / vsc-adr-decorator Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 332 KB

VS Code extension for decorating relevant code passages with compliance checks for provider-specific pattern configurations with Architecture Decision Records (ADR).

TypeScript 100.00%
vscode vscode-extension decoration highlight-text architecture-decision-records

vsc-adr-decorator's Introduction

ADR Decorator Extension for Visual Studio Code

This project contains a prototypical implementation for a ADR decorator extension in VS code.

The extension works with VS code and highlights given YAML configuration files for different kinds of patterns, such as, Rate Limiting, and Active Health Checks, for different providers, e.g., Istio, or Kong.

The extension creates a highlighting of a part of the configuration document which is not compliant with the defined ADR. When hovering over the highlighted lines of code, a text message appears which describes the desired state of the configuration, as defined in the corresponding ADR document.

This extension works with the project structure as defined in pattern-config-checking , where the configuration templates are located in a sources directory under the project root and the ADR documents are located in doc/architecture/decisions/ under the project root.

For generating the corresponding ADR documents, a python-based CLI tool is available in pattern-config-checking . For using this tool, please refer to the instructions given in the linked repository.

VSCode API

The sample code show the usage of the vscode.TextEditor.setDecorations and vscode.window.createTextEditorDecorationType APIs as well as the colors contribution point.

Running the Extension

  • npm install to initialize the project
  • npm run watch to start the compiler in watch mode
  • open this folder in VS Code and press F5
  • this will open the [Extension Development Host] window, running the extension:
    • Open any YAML document, preferably one that defines rate limiting for Istio or Kong
    • The extension will highlight the configuration on the spot where the description of the corresponding ADR is configured and describes the current state of the config within the hover message.

Violated ADR
Semi compliant ADR
Compliant with ADR

vsc-adr-decorator's People

Contributors

kaplanan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.