https://github.com/flycheck/flycheck-google-cpplint
Google C++ Style checker for Flycheck
https://github.com/flycheck/flycheck-google-cpplint
Last synced: 6 months ago
JSON representation
Google C++ Style checker for Flycheck
- Host: GitHub
- URL: https://github.com/flycheck/flycheck-google-cpplint
- Owner: flycheck
- License: gpl-3.0
- Created: 2014-02-28T12:49:55.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2025-02-24T09:52:34.000Z (over 1 year ago)
- Last Synced: 2025-02-24T10:38:26.832Z (over 1 year ago)
- Language: Emacs Lisp
- Size: 54.7 KB
- Stars: 42
- Watchers: 8
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: COPYING
Awesome Lists containing this project
README
[](https://www.gnu.org/licenses/gpl-3.0)
[](https://melpa.org/#/flycheck-google-cpplint)
[](https://stable.melpa.org/#/flycheck-google-cpplint)
# flycheck-google-cpplint.el
[](https://github.com/flycheck/flycheck-google-cpplint/actions/workflows/test.yml)
Add Google C++ Style checker for [Flycheck](https://github.com/flycheck/flycheck).
If you're want to write code according to the
[Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html)
, this will help a great deal.
I recommend that the package
[google-c-style](https://melpa.org/#/google-c-style)
also installed with.
## 💾 Installation
As usual, from [MELPA](https://melpa.org/#/).
In your [Cask](http://cask.github.io) file:
```
(source gnu)
(source melpa)
(depends-on "flycheck-google-cpplint")
```
In your `init.el`:
```el
(eval-after-load 'flycheck
'(progn
(require 'flycheck-google-cpplint)
;; Add Google C++ Style checker.
;; In default, syntax checked by Clang and Cppcheck.
(flycheck-add-next-checker 'c/c++-cppcheck
'(warning . c/c++-googlelint))))
```
If you not use `cppcheck`. You have need to change `flycheck-add-next-checker`.
```el
(flycheck-add-next-checker 'c/c++-clang
'(warning . c/c++-googlelint))
```
## 🔧 Usage
### Install `cpplint` through `pip`
```
pip install cpplint
```
*P.S. Make sure cpplint is in your environment path settings*
### Configure for cpplint.py
```el
(custom-set-variables
'(flycheck-googlelint-verbose "3")
'(flycheck-googlelint-filter "-whitespace,+whitespace/braces")
'(flycheck-googlelint-root "project/src")
'(flycheck-googlelint-linelength "120"))
```
## 🛠️ Contribute
### 🔬 Development
To run the test locally, you will need the following tools:
- [Eask](https://emacs-eask.github.io/)
- [Make](https://www.gnu.org/software/make/) (optional)
Install all dependencies and development dependencies:
```sh
eask install-deps --dev
```
To test the package's installation:
```sh
eask package
eask install
```
To test compilation:
```sh
eask compile
```
**🪧 The following steps are optional, but we recommend you follow these lint results!**
The built-in `checkdoc` linter:
```sh
eask lint checkdoc
```
The standard `package` linter:
```sh
eask lint package
```
*📝 P.S. For more information, find the Eask manual at https://emacs-eask.github.io/.*
## ⚜️ License
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
See [`COPYING`](./COPYING) for details.