Giter VIP home page Giter VIP logo

crossplane-lint's Introduction

crossplane-lint

Crossplane compositions are a great way to build platform APIs. However they are also a great way to introduce bugs! crossplane-lint helps to find those issues as it knows about the internals of compositions & XRDs.

It validates:

  • Schema of managed resources against compositions
  • Schema of XRDs against compositions
  • Different patch types (FromCompositeFieldPath, ToCompositeFieldPath and CombineFromComposite)

Commands

For a detailed overview of all commands and parameters run crossplane-lint --help.

Package linting

crossplane-lint package -f <package-dir>

Scans crossplane composition and XRDs in the given directory for issues. The linter can load additional packages (for example to include provider CRDs) that are defined in .crossplane-lint.yaml in the current working directory:

additionalPackages:
  - image: crossplanecontrib/provider-aws:v0.34.0
  - image: crossplanecontrib/provider-gitlab:v0.3.0
  - image: crossplanecontrib/provider-helm:v0.12.0
  - image: xpkg.upbound.io/grafana/provider-grafana:v0.0.10
  - image: crossplanecontrib/provider-kubernetes:v0.5.0
  - image: crossplanecontrib/provider-styra:v0.3.0

Roadmap

  • Patch Static Type Checking
  • Patch Transform validation
  • Validaton of the XRD Schema itself
  • Disable linter rules per file / line

Development

The binaries are built using goreleaser. The individual build steps are executed using make.

To build a snapshot for your current OS:

make build

To build a snapshot for all platforms:

make build.all

To lint your code:

make lint

Currently, only builds for Mac and Linux (arm and amd64) are available.

crossplane-lint's People

Contributors

mistermx avatar mitsuwa avatar simonvhb 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.