Skip to content

Commit

Permalink
Add YAML linting, fix errors
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Farrell <[email protected]>
  • Loading branch information
dfarrell07 authored and tpantelis committed Aug 26, 2020
1 parent 71bbcc9 commit 7ffe614
Show file tree
Hide file tree
Showing 13 changed files with 87 additions and 44 deletions.
13 changes: 7 additions & 6 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue becomes stale (pull request is overridden later)
# Number of days of inactivity before an Issue becomes stale (pull request is overridden later)
daysUntilStale: 120

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
Expand Down Expand Up @@ -49,8 +50,8 @@ limitPerRun: 30
# only: issues

pulls:
daysUntilStale: 30
markComment: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
daysUntilStale: 30
markComment: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
19 changes: 10 additions & 9 deletions .github/workflows/dco-check.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: DCO Check
on: pull_request

Expand All @@ -6,12 +7,12 @@ jobs:
runs-on: ubuntu-latest
name: DCO Check
steps:
- name: Get PR Commits
id: 'get-pr-commits'
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: DCO Check
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
- name: Get PR Commits
id: 'get-pr-commits'
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: DCO Check
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
6 changes: 4 additions & 2 deletions .github/workflows/e2e.yaml → .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
on:
pull_request:
push:
Expand All @@ -18,7 +19,7 @@ jobs:
deploytool: ['operator', 'helm']
cable_driver: ['', 'wireguard', 'libreswan']
exclude:
# Our Helm setup doesn’t know how to deploy other cable drivers
# Our Helm setup doesn’t know how to deploy other cable drivers
- deploytool: 'helm'
cable_driver: 'wireguard'
- deploytool: 'helm'
Expand All @@ -35,7 +36,8 @@ jobs:
sudo apt install -y linux-headers-$(uname -r) wireguard wireguard-dkms
if [[ "$(uname -r)" =~ -1020- ]]; then
# the 1020 kernel doesn't have skb_reset_redirect in skbuff.h, patch Wireguard so it doesn't need it
curl https://git.zx2c4.com/wireguard-linux/patch/drivers/net/wireguard/queueing.h\?id=2c64605b590edadb3fb46d1ec6badb49e940b479 | sudo patch -R /usr/src/wireguard*/queueing.h
curl https://git.zx2c4.com/wireguard-linux/patch/drivers/net/wireguard/queueing.h\?id=2c64605b590edadb3fb46d1ec6badb49e940b479 \
| sudo patch -R /usr/src/wireguard*/queueing.h
sudo dpkg-reconfigure wireguard-dkms
fi
sudo modprobe wireguard
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
on:
pull_request:
push:
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/md-links-periodic.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Markdown Link Checks
on:
schedule:
Expand All @@ -8,18 +9,18 @@ jobs:
runs-on: ubuntu-latest
name: Markdown Link Checks
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Check out code
uses: actions/checkout@v1

- name: Run markdown-link-check
uses: gaurav-nelson/[email protected]
with:
config-file: ".markdownlinkcheck.json"
- name: Run markdown-link-check
uses: gaurav-nelson/[email protected]
with:
config-file: ".markdownlinkcheck.json"

- name: Raise an Issue to report broken links
if: ${{ failure() }}
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/ISSUE_TEMPLATE/broken-link.md
- name: Raise an Issue to report broken links
if: ${{ failure() }}
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/ISSUE_TEMPLATE/broken-link.md
15 changes: 8 additions & 7 deletions .github/workflows/md-links.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Markdown Link Checks
on: pull_request

Expand All @@ -6,11 +7,11 @@ jobs:
runs-on: ubuntu-latest
name: Markdown Link Checks
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Check out code
uses: actions/checkout@v1

- name: Run markdown-link-check
uses: gaurav-nelson/[email protected]
with:
config-file: ".markdownlinkcheck.json"
check-modified-files-only: "yes"
- name: Run markdown-link-check
uses: gaurav-nelson/[email protected]
with:
config-file: ".markdownlinkcheck.json"
check-modified-files-only: "yes"
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
on:
push:
branches:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
on:
pull_request:
branches:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: YAML Linting
on: pull_request

jobs:
yaml-lint:
runs-on: ubuntu-latest
name: YAML Linting
steps:
- name: Check out code
uses: actions/checkout@v1

- name: Run yamllint
uses: ibiqlik/action-yamllint@v1
with:
file_or_dir: .
config_file: .yamllint.yml
15 changes: 8 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
linters-settings:
gocritic:
enabled-tags:
Expand All @@ -20,17 +21,17 @@ linters:
- bodyclose
- deadcode
- depguard
#- dupl
# - dupl
- errcheck
- exportloopref
#- funlen
#- gochecknoglobals
#- gochecknoinits
# - funlen
# - gochecknoglobals
# - gochecknoinits
- gocritic
- gocyclo
- gofmt
- goimports
#- golint
# - golint
- gosec
- gosimple
- govet
Expand All @@ -42,8 +43,8 @@ linters:
- nakedret
- staticcheck
- structcheck
#- stylecheck
#- testpackage
# - stylecheck
# - testpackage
- typecheck
- unconvert
- unparam
Expand Down
1 change: 1 addition & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# Breaks reusing MD snippets extracted to files
first-line-heading: false

Expand Down
14 changes: 14 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
extends: default

rules:
line-length:
max: 140
# Allow standard GHA syntax for "on: *"
truthy:
ignore: '.github/workflows/*.yml'

ignore: |
/vendor
strict: true
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
Expand Down

0 comments on commit 7ffe614

Please sign in to comment.