forked from opensearch-project/opensearch-go
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.6 KB
/
Copy pathlint.yml
File metadata and controls
42 lines (38 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Lint check
on: [push, pull_request]
env:
GITHUB_ACTIONS: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
# golangci-lint can only compile one point in the build-tag space per
# run. Two mutually-exclusive boolean axes (integration/!integration and
# multinode/!multinode) partition the source tree, so a single tag set
# can never lint every file. Feature tags (core, plugins, ...) are
# pure-OR alternatives and union harmlessly into every run, so complete
# coverage needs one run per (integration, multinode) combination.
build-tags:
- "core plugins plugin_security plugin_index_management"
- "integration core plugins plugin_security plugin_index_management"
- "integration core plugins plugin_security plugin_index_management multinode"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with: { go-version-file: 'go.mod' }
- name: golangci-lint
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9
with:
version: v2.12.2
args: --fix --build-tags "${{ matrix.build-tags }}"
prettify:
name: Prettify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- name: Install dependencies
run: npm i -g prettier
- name: Check markdown files
run: prettier --prose-wrap never --print-width 300 --check **/*.md