Skip to content

Commit 175887d

Browse files
committed
README now recommends brew on linux
* iwyu is just easier to install with the brew package manager * Also changed the test names to be more descriptive
1 parent 1d87bbd commit 175887d

File tree

4 files changed

+18
-24
lines changed

4 files changed

+18
-24
lines changed

.github/workflows/gh_actions_macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: pre-commit-hooks testing
1+
name: test macos latest
22
on: [push]
33
jobs:
44
build:

.github/workflows/gh_actions_ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: pre-commit-hooks testing
1+
name: test ubuntu 20.04
22
on: [push]
33
jobs:
44
build:

.github/workflows/gh_actions_windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: pre-commit-hooks testing
1+
name: test windows latest
22
on: [push]
33
jobs:
44
build:

README.md

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ These options are automatically added to enable all errors or are required.
241241
* cppcheck: `["-q" , "--error-exitcode=1", "--enable=all", "--suppress=unmatchedSuppression", "--suppress=missingIncludeSystem", "--suppress=unusedFunction"]` (See https://github.com/pocc/pre-commit-hooks/pull/30)
242242
* cpplint: `["--verbose=0"]`
243243

244-
If any of these options are supplied in `args:`, they will override the above defaults (use `-<flag>=<option>` if possible when overriding).
244+
If you supply any of these options in `args:`, your options will override the above defaults (use `-<flag>=<option>` if possible when overriding).
245245

246246
### Compilation Database
247247

@@ -259,31 +259,26 @@ As this is also the minimum version of pre-commit, this should not be an issue.
259259

260260
### Installation
261261

262-
_You will need to install these utilities in order to use them. Your package
263-
manager may already have them. Below are the package names for each package manager, if available:_
262+
Use these commands to install some or all of the linters used in this project:
264263

265-
* `apt install clang clang-format clang-tidy uncrustify cppcheck iwyu` [1] [2]
266-
* `yum install llvm uncrustify cppcheck iwyu` [2]
267-
* `brew install llvm oclint uncrustify cppcheck include-what-you-use` [3]
268-
* `choco install llvm uncrustify cppcheck inlcude-what-you-use` [4]
264+
* Linux/Macos
265+
* `brew install llvm uncrustify cppcheck include-what-you-use`
266+
* `pip install cpplint`
267+
* `brew install oclint` (macos), see note below for oclint on Linux
268+
* Windows
269+
* `choco install llvm uncrustify cppcheck inlcude-what-you-use` [4]
270+
* `pip install cpplint`
269271

270-
cpplint can be installed everywhere with `pip install cpplint`.
272+
While it's possible to use other package managers to install these utilities on Linux, I recommend
273+
using brew to avoid dependency issues between llvm and linters that use it.
271274

272-
[1]: `clang` is a required install for `clang-format` or `clang-tidy` to work.
275+
#### Installing oclint
273276

274-
[2]: oclint takes a couple hours to compile. I've compiled and tarred
275-
[oclint-v0.15](https://dl.dropboxusercontent.com/s/nu474emafxj2nn5/oclint.tar.gz)
276-
for those using linux who want to skip the wait (built on Ubuntu-18.04).
277-
You can also download the older [oclint-v0.13.1](https://github.com/oclint/oclint/releases/download/v0.13.1/oclint-0.13.1-x86_64-linux-4.4.0-112-generic.tar.gz)
278-
for linux from oclint's github page (see [releases](https://github.com/oclint/oclint/releases)).
277+
You can install on MacOS with `brew install oclint`.
279278

280-
[3]: Depending on your brew installation, you may need to install
281-
oclint with `brew cask install oclint`.
279+
Oclint's github page also provides compiled binary packages (and zip of source code to compile) for Macos/Linux: [releases](https://github.com/oclint/oclint/releases).
282280

283-
[4]: oclint is not available on windows.
284-
285-
If your package manager is not listed here, it will have similar names for these tools.
286-
You can build all of these from source.
281+
oclint is not available on windows.
287282

288283
### Hook Info
289284

@@ -309,7 +304,6 @@ You can build all of these from source.
309304
| [cpplint](https://github.com/cpplint/cpplint) | | `--verbose=0` | |
310305
| [include-what-you-use](https://github.com/include-what-you-use/include-what-you-use) | | `--verbose=3` | |
311306

312-
313307
[1]: `-fix` will fail if there are compiler errors. `-fix-errors` will `-fix`
314308
and fix compiler errors if it can, like missing semicolons.
315309

0 commit comments

Comments
 (0)