How to use Lintrule in CircleCI
Create a new secret and add it as an environment variable (LINTRULE_SECRET
) to CircleCI workflow.
rules secrets create
Then add the following to your CircleCI config.
version: 2.1
jobs:
build:
docker:
- image: cimg/base:stable
steps:
- checkout
- run:
name: Fetch Git depth of 2
command: |
git fetch --depth=2
- run:
name: Install Lint Rules
command: |
curl -fsSL https://www.lintrule.com/install.sh | bash
- run:
name: Run Lint Rules Check
command: |
rules check --secret ${LINTRULE_SECRET}
workflows:
version: 2
build_and_test:
jobs:
- build:
filters:
branches:
only:
- main