Skip to content

Commit

Permalink
New check: file-cr (Carriage Return only)
Browse files Browse the repository at this point in the history
  • Loading branch information
cytopia committed Dec 13, 2016
1 parent 3ca1830 commit 802c723
Show file tree
Hide file tree
Showing 5 changed files with 942 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ script:
#------------------------------------------------------------
# 2.) Output Info
#------------------------------------------------------------
- bin/file-cr --info
- bin/file-crlf --info
- bin/file-empty --info
- bin/file-nullbyte-char --info
Expand Down Expand Up @@ -89,6 +90,7 @@ script:
#------------------------------------------------------------
# 3.) Test the scripts in dry mode
#------------------------------------------------------------
- bin/file-cr --path=. --config=etc/awesome-ci.conf --dry
- bin/file-crlf --path=. --config=etc/awesome-ci.conf --dry
- bin/file-empty --path=. --config=etc/awesome-ci.conf --dry
- bin/file-nullbyte-char --path=. --config=etc/awesome-ci.conf --dry
Expand Down Expand Up @@ -119,6 +121,10 @@ script:
#------------------------------------------------------------
# 4.) Test the scripts in real mode (without findings)
#------------------------------------------------------------
- bin/file-cr --path=test/ok/ --config=etc/awesome-ci.conf --ignore=".git/,*.pyc,test/,configure.in" --list
- bin/file-cr --path=test/ok/ --config=etc/awesome-ci.conf --ignore=".git/,*.pyc,test/,configure.in" --verbose
- bin/file-cr --path=test/ok/ --config=etc/awesome-ci.conf --ignore=".git/,*.pyc,test/,configure.in"

- bin/file-crlf --path=test/ok/ --config=etc/awesome-ci.conf --ignore=".git/,*.pyc,test/,configure.in" --list
- bin/file-crlf --path=test/ok/ --config=etc/awesome-ci.conf --ignore=".git/,*.pyc,test/,configure.in" --verbose
- bin/file-crlf --path=test/ok/ --config=etc/awesome-ci.conf --ignore=".git/,*.pyc,test/,configure.in"
Expand Down Expand Up @@ -216,6 +222,9 @@ script:
#------------------------------------------------------------
# 5.) Find errors
#------------------------------------------------------------
- if bin/file-cr --path=test/err --config=etc/awesome-ci.conf --verbose; then false; else true; fi
- if bin/file-cr --path=test/err --config=etc/awesome-ci.conf; then false; else true; fi

- if bin/file-crlf --path=test/err --config=etc/awesome-ci.conf --verbose; then false; else true; fi
- if bin/file-crlf --path=test/err --config=etc/awesome-ci.conf; then false; else true; fi

Expand Down Expand Up @@ -291,6 +300,10 @@ script:
#------------------------------------------------------------
# 6.) Find Success
#------------------------------------------------------------
- bin/file-cr --path=test/ok --config=etc/awesome-ci.conf --list
- bin/file-cr --path=test/ok --config=etc/awesome-ci.conf --verbose
- bin/file-cr --path=test/ok --config=etc/awesome-ci.conf

- bin/file-crlf --path=test/ok --config=etc/awesome-ci.conf --list
- bin/file-crlf --path=test/ok --config=etc/awesome-ci.conf --verbose
- bin/file-crlf --path=test/ok --config=etc/awesome-ci.conf
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ All checks have the option to only check by one or more file **extensions**, by
|------|------|---------|-------------|
| Git | [git-conflicts](bin/git-conflicts) | | Scan files and check if they contain git conflicts. |
| Git | [git-ignored](bin/git-ignored) | | Scan git directory and see if ignored files are still in git cache. |
| File | [file-cr](bin/file-cr) || Scan files and check if they contain CR (Carriage Return only). |
| File | [file-crlf](bin/file-crlf) || Scan files and check if they contain CRLF (Windows Line Feeds). |
| File | [file-empty](bin/file-empty) | | Scan files and check if they are empty (0 bytes). |
| File | [file-nullbyte-char](bin/file-nullbyte-char) || Scan files and check if they contain a null-byte character (\x00). |
Expand Down
Loading

0 comments on commit 802c723

Please sign in to comment.