File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # @copyright Copyright (c) contributors to Project Ocre,
3+ # which has been established as Project Ocre a Series of LF Projects, LLC
4+ #
5+ # SPDX-License-Identifier: Apache-2.0
6+
7+ # Simple linter checker for YAML files
8+ # Checks all YAML files with yamllint
9+
10+ set -e
11+
12+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
13+ ROOT_DIR=" $( cd " $SCRIPT_DIR /.." && pwd) "
14+
15+ echo " Checking YAML files."
16+
17+ cd " $ROOT_DIR "
18+
19+ find . -type f \( -name ' *.yml' -o -name ' *.yaml' \) \
20+ ! -path ' */build/*' \
21+ ! -path ' ./ocre-sdk/*' \
22+ ! -path ' ./wasm-micro-runtime/*' \
23+ ! -path ' ./tests/*' \
24+ -print0 | \
25+ xargs -0 yamllint -c " $SCRIPT_DIR /yml_linter_rules.yml"
Original file line number Diff line number Diff line change 1+ # @copyright Copyright (c) contributors to Project Ocre,
2+ # which has been established as Project Ocre a Series of LF Projects, LLC
3+ #
4+ # SPDX-License-Identifier: Apache-2.0
5+
6+ extends : default
7+
8+ rules :
9+ line-length :
10+ max : 150
11+ level : warning
12+ indentation :
13+ spaces : 2
14+ document-start : disable
15+ comments :
16+ min-spaces-from-content : 1
17+ trailing-spaces : enable
18+ empty-lines :
19+ max : 1
20+ truthy : {check-keys: false}
You can’t perform that action at this time.
0 commit comments