Skip to main content

Lint your feature flag config in you CI/CD pipelines ❌ ✅

· 4 min read
Thomas Poignant
Creator of GO Feature Flag

As GO Feature Flag continues to evolve, we're excited to announce a new feature that will make it easier for our users to manage their feature flags. We are introducing the ability to lint your feature flag configuration, which will help ensure that your feature flag configurations are correct and error-free.

command line output

Introducing go-feature-flag-lint

Managing feature flags can be challenging, especially when it comes to configuring them correctly. With our new command line go-feature-flag-lint, we are providing a tool that helps you avoid making mistakes in your feature flag configuration.

To use the feature flag configuration linting feature, simply run the command line, it will analyze your configuration to ensure that it is free of errors. If there are any issues, go-feature-flag-lint will provide you with a detailed report that identifies the problem to help you to fix it.

To get the maximum benefit from this feature, we recommend integrating it into your CI/CD pipelines to catch any issues before they make it to production.

The benefits of using our feature flag configuration linting feature, along with integrating it into your CI/CD pipelines, include:

  • Ensuring that your feature flag configuration is correct, which will reduce the risk of issues and errors in your application.
  • Saving time and effort by automating the process of checking your feature flag configuration.

Configure your CI/CD pipelines

Integrating the feature flag configuration linting into your CI/CD pipeline is simple. First, you will need to install the go-feature-flag-lint CLI tool, which can be used to run the linting process. Next, you can add a new step to your pipeline that runs the go-feature-flag-lint CLI tool to lint your feature flag configuration file.

If there are any issues detected, the CLI tool will exit with a non-zero status code, which will cause your pipeline to fail. By integrating the feature flag configuration linting into your CI/CD pipeline, you can catch any issues with your feature flag configuration before it is deployed to production, reducing the risk of errors and issues.

Here's some examples of how to integrate the feature flag configuration linting into a CI/CD pipeline for popular CI/CD services:

name: "Build"
- main
types: [ opened, synchronize, reopened ]

runs-on: ubuntu-latest
- name: Checkout repository
uses: actions/checkout@v3

- name: Download go-feature-flag-lint
run: curl -L $(curl -s | jq -r '.assets[] | select(.name|match("Linux_x86_64.tar.gz$")) | .browser_download_url' | grep 'go-feature-flag-lint') --output release.tar.gz && tar -zxvf release.tar.gz

- name: Run go-feature-flag-lint
run: ./go-feature-flag-lint --input-format=yaml --input-file=flag-config.yaml # please put the right file name


We are thrilled to be introducing this new feature, which we believe will make a significant difference in how our users manage their feature flags. With the introduction of feature flag configuration linting, we are providing a tool that will make it easier for you to manage your feature flags and get the most out of GO Feature Flag.

If you have any questions about this feature or would like more information, please don't hesitate to get in touch with our support team. We're always here to help!

Get the latest GO Feature Flag updates