You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Readme no docker & allow using platform default version (#66)
* readme about docker-less usage & tidy config file
* change punctuation a bit
* proofreading example
* add example of multi-lined CLI args
* more proofreading
* add macos-latest details
* final proofreading
* update pylintrc; allow version to be blank
* revert docker's default version
* pleasing pylint
* force operator resolution order
Copy file name to clipboardExpand all lines: README.md
+55-10Lines changed: 55 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,7 @@ jobs:
66
66
67
67
-**Description**: Comma-separated list of globs with optional '-' prefix. Globs are processed in order of appearance in the list. Globs without '-' prefix add checks with matching names to the set, globs with the '-' prefix remove checks with matching names from the set of enabled checks. This option's value is appended to the value of the 'Checks' option in a .clang-tidy file (if any).
68
68
- It is possible to disable clang-tidy entirely by setting this option to '-\*'. This allows using only clang-format to lint your source files.
69
+
- It is also possible to rely solely on a .clang-tidy config file by specifying this option as a blank string ('').
-**Description**: The desired version of the [clang-tools](https://hub.docker.com/r/xianpengshen/clang-tools) to use. Accepted options are strings which can be 14, 13, 12, 11, 10, 9, or 8.
80
+
- Set this option to a blank string ('') to use the platform's default installed version.
79
81
- Default: '10'
80
82
81
83
#### `verbosity`
@@ -132,11 +134,25 @@ jobs:
132
134
133
135
This action creates 1 output variable named `checks-failed`. Even if the linting checks fail for source files this action will still pass, but users' CI workflows can use this action's output to exit the workflow early if that is desired.
134
136
135
-
## Using a Windows-based runner
137
+
## Running without the docker container
136
138
137
-
This action can only be run on a runner using the Ubuntu Operating System. However, this action's source code (essentially a python package) can be used on a runner using the Windows Operating System.
139
+
Some Continuous Integration environments require access to non-default compilers
140
+
and/or non-standard libraries. To do this properly, the docker container should
141
+
not be used due to it's isolated file system. Instead, you should use this action's
142
+
python source code as an installed python package (see below).
138
143
139
-
Note: MacOS-based runners have not been tested, but the same approach applies.
144
+
### Using the python source code
145
+
146
+
This action was originally designed to only be used on a runner with the Ubuntu
147
+
Operating System. However, this action's source code (essentially a python package)
148
+
can be used on any runner using the Windows, Ubuntu, or possibly even MacOS (untested)
149
+
virtual environments.
150
+
151
+
Note, some runners already ship with clang-format and/or clang-tidy. As of this writing, the following versions of clang-format and clang-tidy are already available:
152
+
153
+
-`ubuntu-latest` ships with v10, v11, and v12. [More details](https://github.com/actions/virtual-environments/blob/ubuntu20/20220508.1/images/linux/Ubuntu2004-Readme.md).
154
+
-`windows-latest` ships with v13. [More details](https://github.com/actions/virtual-environments/blob/win22/20220511.2/images/win/Windows2022-Readme.md).
155
+
-`macos-latest` ships with v13. [More details](https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md).
# pass the installed path to the '--version' argument
174
-
run: cpp-linter --version=${{ runner.temp }}/llvm
191
+
# pass the installed path to the '--version' argument (Windows only).
192
+
# Any other OS-based runners only take the version number.
193
+
# Example. run: cpp-linter --version=14
194
+
# Omit the version option if using the default version available in the OS.
195
+
run: cpp-linter --version=${{ runner.temp }}/llvm
175
196
176
197
- name: Fail fast?!
177
198
if: steps.linter.outputs.checks-failed > 0
@@ -180,7 +201,31 @@ jobs:
180
201
# run: exit 1
181
202
```
182
203
183
-
All input options listed above are specified by pre-pending a `--`. You can also install this repo locally and run `cpp-linter -h` for more detail.
204
+
All input options listed above are specified by pre-pending a `--`. You can also install this repo locally and run `cpp-linter -h` for more detail. For example:
0 commit comments