Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1059093

Browse files
Christin GruberOskarStark
Christin Gruber
andcommitted
Add docs for --config and --exclude options
Co-authored-by: Oskar Stark <oskarstark@googlemail.com>
1 parentcbffbe9 commit1059093

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

‎components/yaml.rst‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,9 @@ Then, execute the script for validating contents:
430430
# or all the files in multiple directories
431431
$ php lint.php path/to/directory1 path/to/directory2
432432
433+
# exclude specific files from directory
434+
$ php lint.php path/to/directory --exclude="path/to/directory/exclude.yml"
435+
433436
# or contents passed to STDIN
434437
$ cat path/to/file.yaml | php lint.php
435438
@@ -440,6 +443,27 @@ Add the ``--format`` option to get the output in JSON format:
440443
441444
$ php lint.php path/to/file.yaml --format json
442445
446+
The yaml linter can also be configured through the yaml config file. To do so, add
447+
the ``--config=CONFIG`` option to read the linter configuration from
448+
the given yaml linter config file:
449+
450+
..code-block::terminal
451+
452+
$ php lint.php --config=.yamllint.yml
453+
454+
Example contents of the .yamllint.yml config:
455+
456+
..code-block::yaml
457+
458+
parse-tags:false
459+
format:txt
460+
includes:
461+
-path/to/directory/foo.yml
462+
-path/to/directory/bar.yml
463+
-path/to/directory/foo/path
464+
excludes:
465+
-path/to/directory/foo/path/exclude.yml
466+
443467
..tip::
444468

445469
The linting command will also report any deprecations in the checked

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp