Skip to content

Commit

Permalink
Fix YAML source and check it on Shippable (ansible#15678)
Browse files Browse the repository at this point in the history
Fix YAML source and check it on Shippable
  • Loading branch information
adrienverge authored and mattclay committed Jun 4, 2016
1 parent 4fe8fe3 commit 4d48711
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
22 changes: 22 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
extends: default

# Disable all cosmetic rules
# (see https://github.com/ansible/ansible/pull/15470#issuecomment-214437876)
# Only keep 'key-duplicates' and 'new-lines: {type: unix}' checks enabled.

rules:
braces: disable
brackets: disable
colons: disable
commas: disable
comments: disable
comments-indentation: disable
document-start: disable
empty-lines: disable
hyphens: disable
indentation: disable
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: disable
new-lines: {type: unix}
trailing-spaces: disable
2 changes: 1 addition & 1 deletion shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: python

env:
matrix:
- TEST=code-smell
- TEST=code-smell INSTALL_DEPS=1

matrix:
include:
Expand Down
2 changes: 0 additions & 2 deletions test/integration/roles/test_rax_cdb/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@
volume: 3
wait: true
wait_timeout: "{{ rackspace_wait_timeout }}"
wait_timeout: 600
register: rax_cdb

- name: Validate rax_cdb resize volume 2
Expand Down Expand Up @@ -251,7 +250,6 @@
flavor: 2
wait: true
wait_timeout: "{{ rackspace_wait_timeout }}"
wait_timeout: 600
register: rax_cdb

- name: Validate rax_cdb resize flavor 2
Expand Down
1 change: 0 additions & 1 deletion test/integration/test_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
- '"val1" in test_env2.stdout_lines'

- hosts: testhost
tasks:
vars:
- test1:
key1: val1
Expand Down
7 changes: 7 additions & 0 deletions test/utils/shippable/code-smell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

source_root=$(python -c "from os import path; print(path.abspath(path.join(path.dirname('$0'), '../../..')))")

install_deps="${INSTALL_DEPS:-}"

cd "${source_root}"

if [ "${install_deps}" != "" ]; then
pip install yamllint
fi

yamllint .
test/code-smell/replace-urlopen.sh .
test/code-smell/use-compat-six.sh lib
test/code-smell/boilerplate.sh
Expand Down

0 comments on commit 4d48711

Please sign in to comment.