Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Configure some pre-commit hooks for some c++ tools

License

NotificationsYou must be signed in to change notification settings

bmorcos/pre-commit-hooks-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This providespre-commit hooks forclang-format,cpplint, andcppcheck.

Usage

To use these hooks, simply place the following in you.pre-commit-config.yaml(more details below):

repos:-repo:https://github.com/bmorcos/pre-commit-hooks-cpprev:masterhooks:    -id:clang-format    -id:cpplint    -id:cppcheck

clang-format

This requires clang-format to be installed, e.g.sudo apt install clang-format. The default setup uses the Google style guide and will format allC/C++ files and headers found in the repo, however other arguments andparticular files can specified.

-repo:https://github.com/bmorcos/pre-commit-hooks-cpprev:masterhooks:    -id:clang-format#   args: [--option1, -option2=abc]#   files: my_file.cpp|my_other_file.cpp

cpplint

This requires cpplint to be installed, e.g.pip install cpplint. The defaultsetup uses the--verbose=3 flag and will check all C/C++ files and headersfound in the repo, however other arguments and particular files can specified.

-repo:https://github.com/bmorcos/pre-commit-hooks-cpprev:masterhooks:    -id:cpplint#   args: [--option1, -option2=abc]#   files: my_file.cpp|my_other_file.cpp

cppcheck

This requires cppcheck to be installed, e.g.sudo apt install cppcheck. Thedefault setup enables warnings to be displayed and will check all C/C++ filesand headers found in the repo, however other arguments and particular files canspecified.

-repo:https://github.com/bmorcos/pre-commit-hooks-cpprev:masterhooks:    -id:cppcheck#   args: [--option1, -option2=abc]#   files: my_file.cpp|my_other_file.cpp

About

Configure some pre-commit hooks for some c++ tools

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp