forked from sakura-editor/sakura
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sakura-editor#946 from m-tmatma/feature/CPPLINT
CodeFactor で行われる cppcheck.py のチェックをカスタマイズする基盤を作る
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
set noparent | ||
filter=-build,+build/deprecated,+build/printf_format,+build/explicit_make_pair | ||
filter=-readability,+readability/inheritance | ||
filter=-runtime,+runtime/memset,+runtime/threadsafe_fn,+runtime/vlog | ||
filter=-whitespace,+whitespace/blank_line,+whitespace/empty_if_body | ||
filter=-legal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# cpplint.py | ||
|
||
<!-- TOC --> | ||
|
||
- [cpplint.py](#cpplintpy) | ||
- [CodeFactor のスタイルチェック](#codefactor-のスタイルチェック) | ||
- [CodeFactor のデフォルトのCPPLINT.CFG](#codefactor-のデフォルトのcpplintcfg) | ||
- [cpplint.py のインストール](#cpplintpy-のインストール) | ||
- [cpplint.py の実行](#cpplintpy-の実行) | ||
- [cpplint.py のインストール場所の例](#cpplintpy-のインストール場所の例) | ||
- [参考サイト](#参考サイト) | ||
|
||
<!-- /TOC --> | ||
|
||
|
||
# CodeFactor のスタイルチェック | ||
|
||
- CodeFactor では [cpplint](https://pypi.org/project/cpplint/) でチェックを行います。 | ||
- https://support.codefactor.io/i24-analysis-tools-open-source | ||
- [cpplint](https://pypi.org/project/cpplint/) はカレントディレクトリに [CPPLINT.CFG](https://github.com/google/styleguide/blob/6271f3f473ceb3a7fef99388a3040903b1a145f1/cpplint/cpplint.py#L156-L197) というファイルを配置することでフィルタリング条件を指定できます。 | ||
|
||
|
||
# CodeFactor のデフォルトのCPPLINT.CFG | ||
|
||
CodeFactor のデフォルトの `CPPLINT.CFG` は https://github.com/codefactor-io/default-configs/blob/master/CPPLINT.cfg です。 | ||
|
||
# cpplint.py のインストール | ||
|
||
``` | ||
pip install cpplint | ||
``` | ||
|
||
|
||
# cpplint.py の実行 | ||
|
||
|
||
``` | ||
cd /d <sakura editor ソースのトップ> | ||
python <path-to-cpplint>\cpplint.py --recursive sakura_core | ||
``` | ||
|
||
## cpplint.py のインストール場所の例 | ||
|
||
`C:\Python27\Lib\site-packages\cpplint.py` | ||
|
||
# 参考サイト | ||
|
||
- [Analysis Tools (Open Source) at support.codefactor.io](https://support.codefactor.io/i24-analysis-tools-open-source) | ||
- [cpplint (pip)](https://pypi.org/project/cpplint/) | ||
- [CPPLINT.cfg](https://github.com/google/styleguide/blob/6271f3f473ceb3a7fef99388a3040903b1a145f1/cpplint/cpplint.py#L156-L197) | ||
- [default CPPLINT.cfg at support.codefactor.io](https://github.com/codefactor-io/default-configs/blob/master/CPPLINT.cfg) | ||
- [Visual Studioでcpplintする](https://qiita.com/odanado/items/cd364521a048c662a888) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters