Skip to content

Commit be4a512

Browse files
Remove trailing space characters (#1256)
Also add two newlines (rebased from `aaronfranke/formatting`) resolves #1220 Co-authored-by: Aaron Franke <[email protected]>
1 parent 9409824 commit be4a512

15 files changed

+38
-38
lines changed

.clang-tidy

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ WarningsAsErrors: ''
44
HeaderFilterRegex: ''
55
AnalyzeTemporaryDtors: false
66
FormatStyle: none
7-
CheckOptions:
7+
CheckOptions:
88
- key: modernize-use-using.IgnoreMacros
99
value: '0'
1010
...

.travis_scripts/run-clang-format.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env bash
22

33
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4-
python $DIR/run-clang-format.py -r $DIR/../src/**/ $DIR/../include/**/
4+
python $DIR/run-clang-format.py -r $DIR/../src/**/ $DIR/../include/**/

LICENSE

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
The JsonCpp library's source code, including accompanying documentation,
1+
The JsonCpp library's source code, including accompanying documentation,
22
tests and demonstration applications, are licensed under the following
33
conditions...
44

5-
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
6-
jurisdictions which recognize such a disclaimer. In such jurisdictions,
5+
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
6+
jurisdictions which recognize such a disclaimer. In such jurisdictions,
77
this software is released into the Public Domain.
88

99
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
1010
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and
1111
The JsonCpp Authors, and is released under the terms of the MIT License (see below).
1212

13-
In jurisdictions which recognize Public Domain property, the user of this
14-
software may choose to accept it either as 1) Public Domain, 2) under the
15-
conditions of the MIT License (see below), or 3) under the terms of dual
13+
In jurisdictions which recognize Public Domain property, the user of this
14+
software may choose to accept it either as 1) Public Domain, 2) under the
15+
conditions of the MIT License (see below), or 3) under the terms of dual
1616
Public Domain/MIT License conditions described here, as they choose.
1717

1818
The MIT License is about as close to Public Domain as a license can get, and is
1919
described in clear, concise terms at:
2020

2121
http://en.wikipedia.org/wiki/MIT_License
22-
22+
2323
The full text of the MIT License follows:
2424

2525
========================================================================

devtools/antglob.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def glob_impl(root_dir_path):
146146
entry_type = is_file and FILE_LINK or DIR_LINK
147147
else:
148148
entry_type = is_file and FILE or DIR
149-
## print '=> type: %d' % entry_type,
149+
## print '=> type: %d' % entry_type,
150150
if (entry_type & entry_type_filter) != 0:
151151
## print ' => KEEP'
152152
yield os.path.join(dir_path, entry)

devtools/fixeol.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def fix_source_eol(path, is_dry_run = True, verbose = True, eol = '\n'):
3232
if verbose:
3333
print(is_dry_run and ' NEED FIX' or ' FIXED')
3434
return True
35-
##
36-
##
35+
##
36+
##
3737
##
3838
##def _do_fix(is_dry_run = True):
3939
## from waftools import antglob

devtools/licenseupdater.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def update_license(path, dry_run, show_diff):
2020
dry_run: if True, just print the path of the file that would be updated,
2121
but don't change it.
2222
show_diff: if True, print the path of the file that would be modified,
23-
as well as the change made to the file.
23+
as well as the change made to the file.
2424
"""
2525
with open(path, 'rt') as fin:
2626
original_text = fin.read().replace('\r\n','\n')
@@ -51,7 +51,7 @@ def update_license_in_source_directories(source_dirs, dry_run, show_diff):
5151
dry_run: if True, just print the path of the file that would be updated,
5252
but don't change it.
5353
show_diff: if True, print the path of the file that would be modified,
54-
as well as the change made to the file.
54+
as well as the change made to the file.
5555
"""
5656
from devtools import antglob
5757
prune_dirs = antglob.prune_dirs + 'scons-local* ./build* ./libs ./dist'

doxybuild.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def do_subst_in_file(targetfile, sourcefile, dict):
4646
with open(sourcefile, 'r') as f:
4747
contents = f.read()
4848
for (k,v) in list(dict.items()):
49-
v = v.replace('\\','\\\\')
49+
v = v.replace('\\','\\\\')
5050
contents = re.sub(k, v, contents)
5151
with open(targetfile, 'w') as f:
5252
f.write(contents)
@@ -158,7 +158,7 @@ def main():
158158
Generates doxygen documentation in build/doxygen.
159159
Optionally makes a tarball of the documentation to dist/.
160160
161-
Must be started in the project top directory.
161+
Must be started in the project top directory.
162162
"""
163163
from optparse import OptionParser
164164
parser = OptionParser(usage=usage)

example/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
***NOTE***
1+
***NOTE***
22

33
If you get linker errors about undefined references to symbols that involve types in the `std::__cxx11` namespace or the tag
44
`[abi:cxx11]` then it probably indicates that you are trying to link together object files that were compiled with different
5-
values for the _GLIBCXX_USE_CXX11_ABI marco. This commonly happens when linking to a third-party library that was compiled with
5+
values for the _GLIBCXX_USE_CXX11_ABI marco. This commonly happens when linking to a third-party library that was compiled with
66
an older version of GCC. If the third-party library cannot be rebuilt with the new ABI, then you need to recompile your code with
77
the old ABI,just like:
88
**g++ stringWrite.cpp -ljsoncpp -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -o stringWrite**

test/data/legacy_test_array_06.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
1+
[ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
22
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
33
"ccccccccccccccccccccccc",
44
"dddddddddddddddddddddddddddddddddddddddddddddddddddd" ]

test/data/legacy_test_complex_01.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
{
1+
{
22
"count" : 1234,
33
"name" : { "aka" : "T.E.S.T.", "id" : 123987 },
4-
"attribute" : [
5-
"random",
6-
"short",
7-
"bold",
8-
12,
9-
{ "height" : 7, "width" : 64 }
4+
"attribute" : [
5+
"random",
6+
"short",
7+
"bold",
8+
12,
9+
{ "height" : 7, "width" : 64 }
1010
],
11-
"test": { "1" :
12-
{ "2" :
13-
{ "3" : { "coord" : [ 1,2] }
14-
}
11+
"test": { "1" :
12+
{ "2" :
13+
{ "3" : { "coord" : [ 1,2] }
14+
}
1515
}
1616
}
1717
}

test/data/legacy_test_object_03.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"count" : 1234,
33
"name" : "test",
44
"attribute" : "random"

test/data/legacy_test_object_04.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{
1+
{
22
"" : 1234
33
}

test/data/legacy_test_preserve_comment_01.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
/* Comment before 'second'
77
*/
88
.second=2
9-
/* A comment at
9+
/* A comment at
1010
the end of the file.
1111
*/

test/data/legacy_test_preserve_comment_01.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"second" : 2
1010
}
1111

12-
/* A comment at
12+
/* A comment at
1313
the end of the file.
1414
*/

test/pyjsontestrunner.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
if len(sys.argv) != 2:
1616
print("Usage: %s input-json-file", sys.argv[0])
1717
sys.exit(3)
18-
18+
1919
input_path = sys.argv[1]
2020
base_path = os.path.splitext(input_path)[0]
2121
actual_path = base_path + '.actual'
2222
rewrite_path = base_path + '.rewrite'
2323
rewrite_actual_path = base_path + '.actual-rewrite'
2424

2525
def valueTreeToString(fout, value, path = '.'):
26-
ty = type(value)
26+
ty = type(value)
2727
if ty is types.DictType:
2828
fout.write('%s={}\n' % path)
2929
suffix = path[-1] != '.' and '.' or ''
@@ -49,7 +49,7 @@ def valueTreeToString(fout, value, path = '.'):
4949
fout.write('%s=null\n' % path)
5050
else:
5151
assert False and "Unexpected value type"
52-
52+
5353
def parseAndSaveValueTree(input, actual_path):
5454
root = json.loads(input)
5555
fout = file(actual_path, 'wt')
@@ -62,7 +62,7 @@ def rewriteValueTree(value, rewrite_path):
6262
#rewrite = rewrite[1:-1] # Somehow the string is quoted ! jsonpy bug ?
6363
file(rewrite_path, 'wt').write(rewrite + '\n')
6464
return rewrite
65-
65+
6666
input = file(input_path, 'rt').read()
6767
root = parseAndSaveValueTree(input, actual_path)
6868
rewrite = rewriteValueTree(json.write(root), rewrite_path)

0 commit comments

Comments
 (0)