<commit_before>#!/bin/sh
set -e
set -u

exec << EOF
192.0.2.0
192.0.2.1
192.0.2.10
192.0.2.100
192.0.2.255
192.0.0.2
172.16.58.3
172.16.58.3
172.16.31.10
172.16.17.32
192.0.0.2
172.16.58.3
172.16.31.10
172.16.31.10
192.168.127.12
0.192.0.2
172.16.31.10
10.192.0.2
172.16.58.3
255.192.0.2
2001:DB8::
2001:db8::
2001:Db8::
2001:dB8::
2001:dB8::
2001:db8::2160:b110:927e:911a
2001:db8::ffff:b110:927e:911a
2001:db8::0000:b110:927e:911a
2001:db8::0:b110:927e:911a
2001:db8:47fe:1:0:b110:927e:911a
2001:db8:47fe:1::b110:927e:911a
2001:db8:47fe:1::b110:927e:911a
::
0:0:0:0:0:0:0:0
0000:0000:0000:0000:0000:0000:0000:0000
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
::1
1::
f:f:f:f:f:f:f:f
F:F:F:F:F:F:F:F
f::f:f:f:f:f:f
F::F:F:F:F:F:F
::f:f:f:f:f:f:f
::F:F:F:F:F:F:F
f:fc00:e968:6179::de52:7100:f:f:f:f
F:fdf8:f53e:61e4::18:F:F:F
f:fc00:db20:35b:7399::5:f:f
F:fc00:e968:6179::de52:7100:F:F:F
f:fc00:db20:35b:7399::5:f:f
F:fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b:F:F
f:fc00:e968:6179::de52:7100:f
F:fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b:F
f:fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b
F:fc00:db20:35b:7399::5
f:f:f:f:f:f:f::
F:F:F:F:F:F:F::
-6 2001:db8::
-4 192.0.2.0
-n6 2001:db8::/32
-p6 2001:db8::/32
-n4 192.0.2.0/24
-p4 192.0.2.0/24
-nb6 [2001:db8::/32]
-pb6 [2001:db8::/32]
-pb [2001:db8::/32]
EOF

while read l; do
    if ! ./isip -v $l; then
        echo "$l" >&2
        exit 1
    fi
done

exec << EOF
.0.2.0
0.2.1
192.0.2.
192.0.2
192.0.
192.0
.1.2
10.2
100.
.100
100
a.b.c.d
a
g
1
2001:GB8::
2001:gb8::
fdf8:f53e:61e4::18::
-6 192.0.2.1
-4 2001:db8::
[2001:db8::]
[2001:db8::/32]
EOF

while read l; do
    if ./isip -v $l; then
        echo "$l" >&2
        exit 1
    fi
done
<commit_msg>Make purposfully bad ip checks not verbose<commit_after>#!/bin/sh
set -e
set -u

exec << EOF
192.0.2.0
192.0.2.1
192.0.2.10
192.0.2.100
192.0.2.255
192.0.0.2
172.16.58.3
172.16.58.3
172.16.31.10
172.16.17.32
192.0.0.2
172.16.58.3
172.16.31.10
172.16.31.10
192.168.127.12
0.192.0.2
172.16.31.10
10.192.0.2
172.16.58.3
255.192.0.2
2001:DB8::
2001:db8::
2001:Db8::
2001:dB8::
2001:dB8::
2001:db8::2160:b110:927e:911a
2001:db8::ffff:b110:927e:911a
2001:db8::0000:b110:927e:911a
2001:db8::0:b110:927e:911a
2001:db8:47fe:1:0:b110:927e:911a
2001:db8:47fe:1::b110:927e:911a
2fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b27e:911a
::
0:0:0:0:0:0:0:0
0000:0000:0000:0000:0000:0000:0000:0000
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
::1
1::
f:f:f:f:f:f:f:f
F:F:F:F:F:F:F:F
f::f:f:f:f:f:f
F::F:F:F:F:F:F
::f:f:f:f:f:f:f
::F:F:F:F:F:F:F
f:fc00:e968:6179::de52:7100:f:f:f
F:fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b:F:F:F:F
f:fc00:db20:35b:7399::5:f:f
F:fc00:e968:6179::de52:7100:F:F:F
f:fc00:db20:35b:7399::5:f:f
F:fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b:F:F
f:fc00:e968:6179::de52:7100:f
F:fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b:F
f:fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b
F:F:F:F:F:F::F
f:f:f:f:f:f:f::
F:F:F:F:F:F:F::
-6 2001:db8::
-4 192.0.2.0
-n6 2001:db8::/32
-p6 2001:db8::/32
-n4 192.0.2.0/24
-p4 192.0.2.0/24
-nb6 [2001:db8::/32]
-pb6 [2001:db8::/32]
-pb [2001:db8::/32]
EOF

while read l; do
    if ! ./isip -v $l; then
        echo "$l" >&2
        exit 1
    fi
done

exec << EOF
.0.2.0
0.2.1
192.0.2.
192.0.2
192.0.
192.0
.1.2
10.2
100.
.100
100
a.b.c.d
a
g
1
2001:GB8::
2001:gb8::
fdf8:f53e:61e4::18::
-6 192.0.2.1
-4 2001:db8::
[2001:db8::]
[2001:db8::/32]
EOF

while read l; do
    if ./isip $l; then
        echo "$l" >&2
        exit 1
    fi
done

{'fraction_non_alphanumeric': 0.24822089382294335, 'fraction_numerical': 0.3660688869911756, 'mean_word_length': 4.465007776049767, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 48, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2901361', 'n_tokens_mistral': 2897, 'n_tokens_neox': 2256, 'n_words': 287}