Skip to content

Commit 9e14d2c

Browse files
authored
Merge pull request #213 from usegalaxy-ca/lint
Lint yaml files
2 parents 1b58bff + 05ff8b9 commit 9e14d2c

5 files changed

Lines changed: 58 additions & 3 deletions

File tree

.github/workflows/linter.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Linting
2+
3+
# yamllint disable-line rule:truthy
4+
on:
5+
push:
6+
paths:
7+
- '**.yaml'
8+
- '**.yml'
9+
pull_request:
10+
paths:
11+
- '**.yaml'
12+
- '**.yml'
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
lint:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Install yamllint
27+
run: pip install yamllint
28+
29+
- name: Lint YAML files
30+
run: yamllint --format github .

.yamllint

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration
2+
extends: default
3+
4+
yaml-files:
5+
- '*.yaml'
6+
- '*.yml'
7+
- '.yamllint'
8+
9+
# https://yamllint.readthedocs.io/en/stable/rules.html
10+
rules:
11+
line-length: disable
12+
13+
document-start: disable
14+
15+
comments:
16+
require-starting-space: false
17+
min-spaces-from-content: 1
18+
19+
truthy:
20+
allowed-values: ['true', 'false', 'yes', 'no']
21+
22+
ignore:
23+
- terraform/*

ansible/files/galaxy/tool_eu.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# yamllint disable rule:indentation
12
tools:
23
- name: sdmpredictors_list_layers
34
owner: ecology

ansible/files/galaxy/tool_list.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# yamllint disable rule:indentation
12
tools:
23
- name: compose_text_param
34
owner: iuc

ansible/templates/galaxy/config/user_preferences_extra_conf.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ preferences:
66
- name: username
77
label: Username
88
type: text
9-
required: False
9+
required: false
1010
- name: password
1111
label: Password
12-
type: password
13-
required: False
12+
type: password
13+
required: false
1414
# description: ACCP (Alliance Cloud Connect Pilot) Settings
1515
# inputs:
1616
# - name: pulsar_host

0 commit comments

Comments
 (0)