mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Integrate clang-tidy
This commit is contained in:
parent
adbc7ad090
commit
65f26d0f5d
14
.clang-tidy
Normal file
14
.clang-tidy
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
Checks: 'clang-diagnostic-*,clang-analyzer-*,readability-*,modernize-*,bugprone-*,misc-*,-misc-unused-parameters,google-runtime-int,-llvm-header-guard,fuchsia-restrict-system-includes,-clang-analyzer-valist.Uninitialized,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-alpha.*,-readability-magic-numbers,-readability-braces-around-statements'
|
||||||
|
WarningsAsErrors: '*'
|
||||||
|
HeaderFilterRegex: '.*(?<!lookup3.c)$'
|
||||||
|
FormatStyle: 'file'
|
||||||
|
CheckOptions:
|
||||||
|
- key: readability-braces-around-statements.ShortStatementLines
|
||||||
|
value: '1'
|
||||||
|
- key: google-runtime-int.TypeSufix
|
||||||
|
value: '_t'
|
||||||
|
- key: fuchsia-restrict-system-includes.Includes
|
||||||
|
value: '*,-stdint.h,-stdbool.h'
|
||||||
|
|
||||||
|
...
|
|
@ -20,10 +20,14 @@ matrix:
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
|
||||||
|
install:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [[ "$CC" == "clang" ]]; then brew update; brew install llvm; export PATH="/usr/local/opt/llvm/bin:$PATH"; fi; fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- export CFLAGS=-Werror;
|
- export CFLAGS=-Werror;
|
||||||
- make clean; make;
|
- make clean; make;
|
||||||
- make clean;
|
- make clean;
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [[ "$CC" == "clang" ]]; then clang-tidy *.h *.c -- -I/usr/include; fi; fi
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
1
nnn.c
1
nnn.c
|
@ -64,7 +64,6 @@
|
||||||
#ifndef __USE_XOPEN /* Fix failure due to wcswidth(), ncursesw/curses.h includes whcar.h on Ubuntu 14.04 */
|
#ifndef __USE_XOPEN /* Fix failure due to wcswidth(), ncursesw/curses.h includes whcar.h on Ubuntu 14.04 */
|
||||||
#define __USE_XOPEN
|
#define __USE_XOPEN
|
||||||
#endif
|
#endif
|
||||||
#include <curses.h>
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
4
nnn.h
4
nnn.h
|
@ -28,6 +28,10 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <curses.h>
|
||||||
|
|
||||||
#define CONTROL(c) ((c) ^ 0x40)
|
#define CONTROL(c) ((c) ^ 0x40)
|
||||||
|
|
||||||
/* Supported actions */
|
/* Supported actions */
|
||||||
|
|
Loading…
Reference in a new issue