chore: only check new issues with Go linter (#10054)

This commit is contained in:
Sebastian Spaink 2021-11-03 15:57:44 -05:00 committed by GitHub
parent 5b1c9f3c4c
commit 00325f20c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 2 deletions

35
.github/workflows/golangci-lint.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: golangci-lint
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
# Trigger every day at 16:00 UTC
- cron: '0 16 * * *'
jobs:
golangci-pr:
if: github.ref != 'refs/heads/master'
name: lint-pr-changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.42.1
only-new-issues: true
golangci-master:
if: github.ref == 'refs/heads/master'
name: lint-master-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.42.1
only-new-issues: true
args: --issues-exit-code=0

View File

@ -56,4 +56,3 @@ jobs:
LINTER_RULES_PATH: '.'
MARKDOWN_CONFIG_FILE: .markdownlint.yml
VALIDATE_MARKDOWN: true
VALIDATE_GO: true

View File

@ -5,7 +5,6 @@
[![Circle CI](https://circleci.com/gh/influxdata/telegraf.svg?style=svg)](https://circleci.com/gh/influxdata/telegraf) [![Docker pulls](https://img.shields.io/docker/pulls/library/telegraf.svg)](https://hub.docker.com/_/telegraf/)
[![Slack Status](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://www.influxdata.com/slack)
[![GitHub Super-Linter](https://github.com/influxdata/telegraf/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)
Telegraf is an agent for collecting, processing, aggregating, and writing metrics. Based on a
plugin system to enable developers in the community to easily add support for additional