Skip to content

Commit 1adaab3

Browse files
authored
Merge pull request #11 from jcs-PR/fix
Ready for resubmission
2 parents 1d8a090 + 96d916d commit 1adaab3

File tree

2 files changed

+20
-31
lines changed

2 files changed

+20
-31
lines changed

README.md

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# flycheck-google-cpplint.el
22

3+
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-green.svg)](https://www.gnu.org/licenses/gpl-3.0)
4+
35
Add Google C++ Style checker for [Flycheck](https://github.com/flycheck/flycheck).
46

57
If you're want to write code according to the
6-
[Google C++ Style Guide](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml)
8+
[Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html)
79
, this will help a great deal.
810

911
I recommend that the package
10-
[google-c-style](http://melpa.milkbox.net/#/google-c-style)
12+
[google-c-style](https://melpa.org/#/google-c-style)
1113
also installed with.
1214

1315
## Installation
1416

15-
As usual, from [MELPA](http://melpa.milkbox.net).
17+
As usual, from [MELPA](https://melpa.org/#/).
1618

1719
In your [Cask](http://cask.github.io) file:
1820

@@ -25,7 +27,7 @@ In your [Cask](http://cask.github.io) file:
2527

2628
In your `init.el`:
2729

28-
```
30+
```el
2931
(eval-after-load 'flycheck
3032
'(progn
3133
(require 'flycheck-google-cpplint)
@@ -37,38 +39,24 @@ In your `init.el`:
3739

3840
If you not use `cppcheck`. You have need to change `flycheck-add-next-checker`.
3941

40-
```
42+
```el
4143
(flycheck-add-next-checker 'c/c++-clang
4244
'(warning . c/c++-googlelint))
4345
```
4446

4547
## Usage
4648

47-
### Install cpplint.py
48-
49-
```
50-
$ wget http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py
51-
$ sudo mv cpplint.py /usr/local/bin/cpplint.py
52-
$ sudo chmod 755 /usr/local/bin/cpplint.py
53-
```
54-
55-
You should be able to run the `cpplint.py` command in Emacs.
56-
If above location,
49+
### Install `cpplint` through `pip`
5750

5851
```
59-
(executable-find "cpplint.py") ; => "/usr/local/bin/cpplint.py"
52+
$ pip install cpplint
6053
```
6154

62-
or
63-
64-
```
65-
(custom-set-variables
66-
'(flycheck-c/c++-googlelint-executable "/usr/local/bin/cpplint.py"))
67-
```
55+
*P.S. Make sure cpplint is in your environment path settings*
6856

6957
### Configure for cpplint.py
7058

71-
```
59+
```el
7260
(custom-set-variables
7361
'(flycheck-googlelint-verbose "3")
7462
'(flycheck-googlelint-filter "-whitespace,+whitespace/braces")
@@ -88,7 +76,7 @@ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
8876
PARTICULAR PURPOSE. See the GNU General Public License for more details.
8977

9078
You should have received a copy of the GNU General Public License along with
91-
this program. If not, see http://www.gnu.org/licenses/.
79+
this program. If not, see https://www.gnu.org/licenses/.
9280

9381
See
9482
[COPYING](https://github.com/flycheck/flycheck-google-cpplint/blob/master/COPYING)

flycheck-google-cpplint.el

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
;; Copyright (C) 2014 Akiha Senda
44

55
;; Author: Akiha Senda <[email protected]>
6+
;; Maintainer: Jen-Chieh Shen <[email protected]>
67
;; URL: https://github.com/flycheck/flycheck-google-cpplint/
78
;; Version: 1.0.1
89
;; Keywords: flycheck, C, C++
@@ -21,21 +22,21 @@
2122
;; GNU General Public License for more details.
2223

2324
;; You should have received a copy of the GNU General Public License
24-
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
25+
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
2526

2627
;;; Commentary:
2728

2829
;; This is extension for Flycheck.
2930

3031
;; If you're want to write code according to the Google C++ Style Guide,
3132
;; this will help a great deal.
32-
;; http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
33+
;; https://google.github.io/styleguide/cppguide.html
3334

3435
;; I recommend that the package google-c-style also installed with.
35-
;; http://melpa.milkbox.net/#/google-c-style
36+
;; https://melpa.org/#/google-c-style
3637

3738
;; For more infomations, please check the GitHub
38-
;; https://github.com/senda-akiha/flycheck-google-cpplint/
39+
;; https://github.com/flycheck/flycheck-google-cpplint/
3940

4041
;;;; Setup
4142

@@ -120,8 +121,9 @@ linelength=digits
120121
"A C/C++ style checker using google cpplint.
121122
122123
See URL
123-
`http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py'."
124-
:command ("cpplint.py"
124+
`https://github.com/google/styleguide/blob/gh-pages/cpplint/cpplint.py' and
125+
`https://pypi.org/project/cpplint/#description'."
126+
:command ("cpplint"
125127
(option "--verbose=" flycheck-googlelint-verbose concat)
126128
(option "--filter=" flycheck-googlelint-filter concat
127129
flycheck-option-comma-separated-list)
@@ -135,5 +137,4 @@ See URL
135137
(add-to-list 'flycheck-checkers 'c/c++-googlelint 'append)
136138

137139
(provide 'flycheck-google-cpplint)
138-
139140
;;; flycheck-google-cpplint.el ends here

0 commit comments

Comments
 (0)