-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (60 loc) · 2.05 KB
/
lint.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: lint
on:
push:
tags:
- v*
branches:
- main
pull_request:
permissions: {}
jobs:
lint-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
# Using setup-go cache conflicts with golangci-lint action own cache management
cache: false
cache-dependency-path: go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: latest
# Optional: golangci-lint command line arguments.
args: --timeout=10m
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true
# Optional:The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
install-mode: "goinstall"
- name: Check tidy
run: go mod tidy && git diff-files --exit-code go.mod go.sum
lint-python-type:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python requirements
run: pip3 install -r requirements.txt
- name: Install pyright
run: pip3 install pyright
- name: Run pyright
run: pyright tasks
lint-python:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install lint python requirements
run: pip3 install -r https://raw.githubusercontent.com/DataDog/datadog-agent-buildimages/main/requirements.txt
- name: Run linters
run: |
ruff format --check tasks
ruff check tasks
vulture --ignore-decorators @task --ignore-names 'test_*,Test*' tasks