forked from cpp-linter/cpp-linter-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
90 lines (89 loc) · 3.87 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: C/C++ Lint Action
description: Automatically checks push & PR changes with clang-format & clang-tidy, then post annotations/comments with faulty results.
author: shenxianpeng
branding:
icon: "check-circle"
color: "green"
inputs:
thread-comments:
description: Set this option to false to disable the use of thread comments as feedback. Defaults to true.
required: false
default: false
style:
description: >
The style rules to use (defaults to 'llvm').
Set this to 'file' to have clang-format use the closest relative .clang-format file.
required: false
default: "llvm"
extensions:
description: >
The file extensions to run the action against.
This comma-separated string defaults to 'c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx'.
required: false
default: "c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx"
tidy-checks:
description: >
A string of regex-like patterns specifying what checks clang-tidy will use.
This defaults to 'boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*'. See also clang-tidy docs for more info.
required: false
default: "boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*"
repo-root:
description: >
The relative path to the repository root directory. The default value '.' is relative to the runner's GITHUB_WORKSPACE environment variable.
required: false
default: "."
version:
description: "The desired version of the clang tools to use. Accepted options are strings which can be 14, 13, 12, 11, 10, 9, or 8. Defaults to 10."
required: false
default: "10"
verbosity:
description: A hidden option to control the action's log verbosity. This is the `logging` level (degaults to DEBUG)
required: false
default: "10"
lines-changed-only:
description: Set this option to 'true' to only analyse changes in the event's diff. Defaults to 'false'.
required: false
default: false
files-changed-only:
description: Set this option to 'false' to analyse any source files in the repo. Defaults to 'true'.
required: false
default: true
ignore:
description: >
Set this option with string of path(s) to ignore.
- In the case of multiple paths, you can use a pipe character ('|')
to separate the multiple paths. Multiple lines are forbidden as input to this option.
- This can also have files, but the file's relative path has to be specified
as well.
- There is no need to use './' for each entry; a blank string ('') represents
the repo-root path (specified by the `repo-root` input option).
- Path(s) containing a space should be inside single quotes.
- Submodules are automatically ignored.
- Prefix a path with a bang (`!`) to make it explicitly not ignored - order of
multiple paths does take precedence. The `!` prefix can be applied to
submodules if desired.
- Glob patterns are not supported here. All asterisk characters ('*') are literal.
required: false
default: ".github"
database:
description: The directory containing compile_commands.json file.
required: false
default: ""
outputs:
checks-failed:
description: An integer that can be used as a boolean value to indicate if all checks failed.
runs:
using: "docker"
image: "Dockerfile"
args:
- --style=${{ inputs.style }}
- --extensions=${{ inputs.extensions }}
- --tidy-checks=${{ inputs.tidy-checks }}
- --repo-root=${{ inputs.repo-root }}
- --version=${{ inputs.version }}
- --verbosity=${{ inputs.verbosity }}
- --lines-changed-only=${{ inputs.lines-changed-only }}
- --files-changed-only=${{ inputs.files-changed-only }}
- --thread-comments=${{ inputs.thread-comments }}
- --ignore=${{ inputs.ignore }}
- --database=${{ inputs.database }}