Skip to content

Remove trailing space characters and add a few missing newlines #1220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: none
CheckOptions:
CheckOptions:
- key: modernize-use-using.IgnoreMacros
value: '0'
...
Expand Down
2 changes: 1 addition & 1 deletion .travis_scripts/run-clang-format.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
python $DIR/run-clang-format.py -r $DIR/../src/**/ $DIR/../include/**/
python $DIR/run-clang-format.py -r $DIR/../src/**/ $DIR/../include/**/
14 changes: 7 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
The JsonCpp library's source code, including accompanying documentation,
The JsonCpp library's source code, including accompanying documentation,
tests and demonstration applications, are licensed under the following
conditions...

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

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

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

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

http://en.wikipedia.org/wiki/MIT_License

The full text of the MIT License follows:

========================================================================
Expand Down
2 changes: 1 addition & 1 deletion devtools/antglob.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def glob_impl(root_dir_path):
entry_type = is_file and FILE_LINK or DIR_LINK
else:
entry_type = is_file and FILE or DIR
## print '=> type: %d' % entry_type,
## print '=> type: %d' % entry_type,
if (entry_type & entry_type_filter) != 0:
## print ' => KEEP'
yield os.path.join(dir_path, entry)
Expand Down
4 changes: 2 additions & 2 deletions devtools/fixeol.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def fix_source_eol(path, is_dry_run = True, verbose = True, eol = '\n'):
if verbose:
print(is_dry_run and ' NEED FIX' or ' FIXED')
return True
##
##
##
##
##
##def _do_fix(is_dry_run = True):
## from waftools import antglob
Expand Down
4 changes: 2 additions & 2 deletions devtools/licenseupdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def update_license(path, dry_run, show_diff):
dry_run: if True, just print the path of the file that would be updated,
but don't change it.
show_diff: if True, print the path of the file that would be modified,
as well as the change made to the file.
as well as the change made to the file.
"""
with open(path, 'rt') as fin:
original_text = fin.read().replace('\r\n','\n')
Expand Down Expand Up @@ -51,7 +51,7 @@ def update_license_in_source_directories(source_dirs, dry_run, show_diff):
dry_run: if True, just print the path of the file that would be updated,
but don't change it.
show_diff: if True, print the path of the file that would be modified,
as well as the change made to the file.
as well as the change made to the file.
"""
from devtools import antglob
prune_dirs = antglob.prune_dirs + 'scons-local* ./build* ./libs ./dist'
Expand Down
4 changes: 2 additions & 2 deletions doxybuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def do_subst_in_file(targetfile, sourcefile, dict):
with open(sourcefile, 'r') as f:
contents = f.read()
for (k,v) in list(dict.items()):
v = v.replace('\\','\\\\')
v = v.replace('\\','\\\\')
contents = re.sub(k, v, contents)
with open(targetfile, 'w') as f:
f.write(contents)
Expand Down Expand Up @@ -158,7 +158,7 @@ def main():
Generates doxygen documentation in build/doxygen.
Optionally makes a tarball of the documentation to dist/.

Must be started in the project top directory.
Must be started in the project top directory.
"""
from optparse import OptionParser
parser = OptionParser(usage=usage)
Expand Down
4 changes: 2 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
***NOTE***
***NOTE***

If you get linker errors about undefined references to symbols that involve types in the `std::__cxx11` namespace or the tag
`[abi:cxx11]` then it probably indicates that you are trying to link together object files that were compiled with different
values for the _GLIBCXX_USE_CXX11_ABI marco. This commonly happens when linking to a third-party library that was compiled with
values for the _GLIBCXX_USE_CXX11_ABI marco. This commonly happens when linking to a third-party library that was compiled with
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
the old ABI,just like:
**g++ stringWrite.cpp -ljsoncpp -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -o stringWrite**
Expand Down
2 changes: 1 addition & 1 deletion test/data/legacy_test_array_06.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
[ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"ccccccccccccccccccccccc",
"dddddddddddddddddddddddddddddddddddddddddddddddddddd" ]
22 changes: 11 additions & 11 deletions test/data/legacy_test_complex_01.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
{
"count" : 1234,
"name" : { "aka" : "T.E.S.T.", "id" : 123987 },
"attribute" : [
"random",
"short",
"bold",
12,
{ "height" : 7, "width" : 64 }
"attribute" : [
"random",
"short",
"bold",
12,
{ "height" : 7, "width" : 64 }
],
"test": { "1" :
{ "2" :
{ "3" : { "coord" : [ 1,2] }
}
"test": { "1" :
{ "2" :
{ "3" : { "coord" : [ 1,2] }
}
}
}
}
2 changes: 1 addition & 1 deletion test/data/legacy_test_object_03.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"count" : 1234,
"name" : "test",
"attribute" : "random"
Expand Down
2 changes: 1 addition & 1 deletion test/data/legacy_test_object_04.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
{
"" : 1234
}
2 changes: 1 addition & 1 deletion test/data/legacy_test_preserve_comment_01.expected
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
/* Comment before 'second'
*/
.second=2
/* A comment at
/* A comment at
the end of the file.
*/
2 changes: 1 addition & 1 deletion test/data/legacy_test_preserve_comment_01.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"second" : 2
}

/* A comment at
/* A comment at
the end of the file.
*/
8 changes: 4 additions & 4 deletions test/pyjsontestrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
if len(sys.argv) != 2:
print("Usage: %s input-json-file", sys.argv[0])
sys.exit(3)

input_path = sys.argv[1]
base_path = os.path.splitext(input_path)[0]
actual_path = base_path + '.actual'
rewrite_path = base_path + '.rewrite'
rewrite_actual_path = base_path + '.actual-rewrite'

def valueTreeToString(fout, value, path = '.'):
ty = type(value)
ty = type(value)
if ty is types.DictType:
fout.write('%s={}\n' % path)
suffix = path[-1] != '.' and '.' or ''
Expand All @@ -49,7 +49,7 @@ def valueTreeToString(fout, value, path = '.'):
fout.write('%s=null\n' % path)
else:
assert False and "Unexpected value type"

def parseAndSaveValueTree(input, actual_path):
root = json.loads(input)
fout = file(actual_path, 'wt')
Expand All @@ -62,7 +62,7 @@ def rewriteValueTree(value, rewrite_path):
#rewrite = rewrite[1:-1] # Somehow the string is quoted ! jsonpy bug ?
file(rewrite_path, 'wt').write(rewrite + '\n')
return rewrite

input = file(input_path, 'rt').read()
root = parseAndSaveValueTree(input, actual_path)
rewrite = rewriteValueTree(json.write(root), rewrite_path)
Expand Down