Skip to content

Commit

Permalink
Add yaml linter github action
Browse files Browse the repository at this point in the history
  • Loading branch information
bennerv committed May 7, 2024
1 parent b68fe7e commit d2f63b6
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: 'ci-go'
on:
pull_request:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# MegaLinter GitHub Action configuration file
# More info at https://oxsecurity.github.io/megalinter
name: mega-linter-yaml

on:
pull_request:

permissions:
contents: read

jobs:
build:
name: mega-linter-yaml
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 1

- name: yamllint
uses: oxsecurity/megalinter/flavors/ci_light@v7
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
run:
timeout: 10m
skip-dirs-use-default: true
Expand All @@ -22,4 +23,4 @@ linters:
- unused
linters-settings:
goimports:
local-prefixes: github.com/Azure/ARO-HCP
local-prefixes: github.com/Azure/ARO-HCP
30 changes: 30 additions & 0 deletions .yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'

rules:
braces: enable
brackets: enable
colons: enable
commas: enable
comments: disable
comments-indentation: disable
document-end: disable
document-start: disable
empty-lines: enable
empty-values: disable
hyphens: enable
indentation: disable
key-duplicates: enable
key-ordering: disable
line-length: disable
new-line-at-end-of-file: enable
new-lines: enable
octal-values: disable
quoted-strings: disable
trailing-spaces: enable
truthy:
level: warning
check-keys: false
3 changes: 0 additions & 3 deletions api/redhatopenshift/HcpCluster/hcpCluster-models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,6 @@ model PlatformProfile {
/** The core outgoing configuration */
outboundType?: OutboundType = OutboundType.loadBalancer;

/** Specifies whether subnets are pre-attached with an NSG */
preconfiguredNsgs: boolean;

/** The id of the disk encryption set to be used for etcd.
* Configure this when `etcdEncryption` is set to true
* Is used the https://learn.microsoft.com/en-us/azure/storage/common/customer-managed-keys-overview
Expand Down
1 change: 1 addition & 0 deletions api/redhatopenshift/HcpCluster/tspconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
emit:
- '@azure-tools/typespec-autorest'
options:
Expand Down

0 comments on commit d2f63b6

Please sign in to comment.