Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
feature: add yamllint tool to format yaml files
Browse files Browse the repository at this point in the history
1. add the yamllint into the circleci config
2. format the yaml files according to yamllint

Signed-off-by: fengzixu <[email protected]>
  • Loading branch information
fengzixu committed Dec 7, 2019
1 parent 20dca47 commit a32f2fd
Show file tree
Hide file tree
Showing 8 changed files with 1,429 additions and 1,421 deletions.
13 changes: 9 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Golang CircleCI 2.1 configuration file
---
version: 2.1

orbs:
Expand All @@ -10,7 +11,7 @@ jobs:
docker:
# this image is built from Dockerfile
# https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile
- image: pouchcontainer/pouchlinter:v0.2.4
- image: dragonflyoss/linter:v0.2.7
working_directory: /go/src/github.com/dragonflyoss/Dragonfly
steps:
- checkout
Expand All @@ -36,11 +37,15 @@ jobs:
- run:
name: use opensource tool client9/misspell to correct commonly misspelled English words
command: |
find ./* -name "*" | xargs misspell -error
find . -name "*" | xargs misspell -error
- run:
name: use yamllint tool to check the format of all yaml files
command: |
find . -name "*.yml" | xargs yamllint -d "{extends: default, rules: {line-length: disable}}"
- run:
name: use ShellCheck (https://github.com/koalaman/shellcheck) to check the validateness of shell scripts in pouch repo
command: |
find ./ -name "*.sh" | xargs shellcheck
find . -name "*.sh" | xargs shellcheck
- run:
name: validate go mod files
command: |
Expand Down Expand Up @@ -111,7 +116,7 @@ jobs:
- run: curl -sL https://git.io/goreleaser | bash
- go/save-cache

# TODO(yeya24): Consider changing to use goreleaser to publish images later
# TODO(yeya24): Consider changing to use goreleaser to publish images later
publish-images:
docker:
- image: circleci/golang:1.12.10
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
run:
deadline: 3m
modules-download-mode: readonly
Expand Down
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
---
env:
- GO111MODULE=on
- CGO_ENABLED=0
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
services:
- docker
sudo: false
Expand Down
Loading

0 comments on commit a32f2fd

Please sign in to comment.