Unverified Commit 6965ff00 authored by Niels Lohmann's avatar Niels Lohmann

Merge branch 'develop' into feature/ubjson

parents c772c01a 411c16cb
...@@ -8,7 +8,7 @@ To make it as easy as possible for you to contribute and for me to keep an overv ...@@ -8,7 +8,7 @@ To make it as easy as possible for you to contribute and for me to keep an overv
## Private reports ## Private reports
Usually, all issues are tracked publicly on [Github](https://github.com/nlohmann/json/issues). If you want to make a private report (e.g., for a vulnerability or to attach an example that is not meant to be publisheed), please send an email to <mail@nlohmann.me>. Usually, all issues are tracked publicly on [GitHub](https://github.com/nlohmann/json/issues). If you want to make a private report (e.g., for a vulnerability or to attach an example that is not meant to be published), please send an email to <mail@nlohmann.me>.
## Prerequisites ## Prerequisites
...@@ -26,9 +26,11 @@ Please stick to the [issue template](https://github.com/nlohmann/json/blob/devel ...@@ -26,9 +26,11 @@ Please stick to the [issue template](https://github.com/nlohmann/json/blob/devel
## Files to change ## Files to change
There are currently two files which need to be edited: :exclamation: Before you make any changes, note the single-header file [`src/json.hpp`](https://github.com/nlohmann/json/blob/develop/src/json.hpp) is **generated** from the source files in the [`develop` directory](https://github.com/nlohmann/json/tree/develop/develop). Please **do not** edit file `src/json.hpp` directly, but change the `develop` sources and regenerate file `src/json.hpp` by executing `make amalgamate`.
1. [`src/json.hpp`](https://github.com/nlohmann/json/blob/master/src/json.hpp) To make changes, you need to edit the following files:
1. [`develop/*`](https://github.com/nlohmann/json/tree/develop/develop) - These files are the sources of the library. Before testing or creating a pull request, execute `make amalgamate` to regenerate `src/json.hpp`.
2. [`test/src/unit-*.cpp`](https://github.com/nlohmann/json/tree/develop/test/src) - These files contain the [Catch](https://github.com/philsquared/Catch) unit tests which currently cover [100 %](https://coveralls.io/github/nlohmann/json) of the library's code. 2. [`test/src/unit-*.cpp`](https://github.com/nlohmann/json/tree/develop/test/src) - These files contain the [Catch](https://github.com/philsquared/Catch) unit tests which currently cover [100 %](https://coveralls.io/github/nlohmann/json) of the library's code.
......
...@@ -4,9 +4,12 @@ ...@@ -4,9 +4,12 @@
## Pull request checklist ## Pull request checklist
Read the [Contribution Guidelines](https://github.com/nlohmann/json/blob/develop/.github/CONTRIBUTING.md) for detailed information.
- [ ] Changes are described in the pull request, or an [existing issue is referenced](https://github.com/nlohmann/json/issues). - [ ] Changes are described in the pull request, or an [existing issue is referenced](https://github.com/nlohmann/json/issues).
- [ ] The test suite [compiles and runs](https://github.com/nlohmann/json/blob/develop/README.md#execute-unit-tests) without error. - [ ] The test suite [compiles and runs](https://github.com/nlohmann/json/blob/develop/README.md#execute-unit-tests) without error.
- [ ] [Code coverage](https://coveralls.io/github/nlohmann/json) is 100%. Test cases can be added by editing the [test suite](https://github.com/nlohmann/json/tree/develop/test/src). - [ ] [Code coverage](https://coveralls.io/github/nlohmann/json) is 100%. Test cases can be added by editing the [test suite](https://github.com/nlohmann/json/tree/develop/test/src).
- [ ] The source code is amalgamated; that is, after making changes to the sources in the `develop` directory, run `make amalgamate` to create the single-header file `src/json.hpp`. The whole process is described [here](https://github.com/nlohmann/json/blob/develop/.github/CONTRIBUTING.md#files-to-change).
## Please don't ## Please don't
......
...@@ -278,6 +278,11 @@ script: ...@@ -278,6 +278,11 @@ script:
- ctest -C Release -V -j - ctest -C Release -V -j
- cd .. - cd ..
# check if header was correctly amalgamated
- if [ `which python` ]; then
make check-amalgamation ;
fi
# check if homebrew works (only checks develop branch) # check if homebrew works (only checks develop branch)
- if [ `which brew` ]; then - if [ `which brew` ]; then
brew update ; brew update ;
......
...@@ -32,7 +32,7 @@ all: ...@@ -32,7 +32,7 @@ all:
@echo "amalgamate - amalgamate file src/json.hpp from the develop sources" @echo "amalgamate - amalgamate file src/json.hpp from the develop sources"
@echo "ChangeLog.md - generate ChangeLog file" @echo "ChangeLog.md - generate ChangeLog file"
@echo "check - compile and execute test suite" @echo "check - compile and execute test suite"
@echo "check-amalagamation - check whether sources have been amalgamated" @echo "check-amalgamation - check whether sources have been amalgamated"
@echo "check-fast - compile and execute test suite (skip long-running tests)" @echo "check-fast - compile and execute test suite (skip long-running tests)"
@echo "clean - remove built files" @echo "clean - remove built files"
@echo "coverage - create coverage information with lcov" @echo "coverage - create coverage information with lcov"
...@@ -258,7 +258,7 @@ src/json.hpp: $(SRCS) ...@@ -258,7 +258,7 @@ src/json.hpp: $(SRCS)
$(MAKE) pretty $(MAKE) pretty
# check if src/json.hpp has been amalgamated from the develop sources # check if src/json.hpp has been amalgamated from the develop sources
check-amalagamation: check-amalgamation:
@mv src/json.hpp src/json.hpp~ @mv src/json.hpp src/json.hpp~
@$(MAKE) amalgamate @$(MAKE) amalgamate
@diff src/json.hpp src/json.hpp~ || (echo "===================================================================\n Amalgamation required! Please read the contribution guidelines\n in file .github/CONTRIBUTING.md.\n===================================================================" ; mv src/json.hpp~ src/json.hpp ; false) @diff src/json.hpp src/json.hpp~ || (echo "===================================================================\n Amalgamation required! Please read the contribution guidelines\n in file .github/CONTRIBUTING.md.\n===================================================================" ; mv src/json.hpp~ src/json.hpp ; false)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment