Issue #958: Travis CI should enforce clang-format standards (#1026)

* Issue #958: Travis CI should enfore clang-format standards

This patch adds clang format support to the travis bots.

* Update path

* Roll back to version 8 since 9 is in test

* Cleanup clang

* Revert "Delete JSONCPP_DEPRECATED, use [[deprecated]] instead. (#978)" (#1029)

This reverts commit b27c83f691.
This commit is contained in:
Jordan Bayles
2019-10-11 11:19:00 -07:00
committed by GitHub
parent c4bc6da87d
commit f34bf24bbd
15 changed files with 511 additions and 249 deletions

View File

@@ -493,8 +493,8 @@ public:
/// Return the member named key if it exist, defaultValue otherwise.
/// \note deep copy
/// \note key may contain embedded nulls.
Value
get(const char* begin, const char* end, const Value& defaultValue) const;
Value get(const char* begin, const char* end,
const Value& defaultValue) const;
/// Return the member named key if it exist, defaultValue otherwise.
/// \note deep copy
/// \param key may contain embedded nulls.
@@ -567,8 +567,8 @@ public:
//# endif
/// \deprecated Always pass len.
[[deprecated("Use setComment(String const&) instead.")]] void
setComment(const char* comment, CommentPlacement placement) {
JSONCPP_DEPRECATED("Use setComment(String const&) instead.")
void setComment(const char* comment, CommentPlacement placement) {
setComment(String(comment, strlen(comment)), placement);
}
/// Comments must be //... or /* ... */
@@ -691,8 +691,7 @@ private:
*/
class JSON_API Path {
public:
Path(const String& path,
const PathArgument& a1 = PathArgument(),
Path(const String& path, const PathArgument& a1 = PathArgument(),
const PathArgument& a2 = PathArgument(),
const PathArgument& a3 = PathArgument(),
const PathArgument& a4 = PathArgument(),
@@ -709,10 +708,8 @@ private:
typedef std::vector<PathArgument> Args;
void makePath(const String& path, const InArgs& in);
void addPathInArg(const String& path,
const InArgs& in,
InArgs::const_iterator& itInArg,
PathArgument::Kind kind);
void addPathInArg(const String& path, const InArgs& in,
InArgs::const_iterator& itInArg, PathArgument::Kind kind);
static void invalidPath(const String& path, int location);
Args args_;
@@ -753,7 +750,8 @@ public:
/// objectValue.
/// \deprecated This cannot be used for UTF-8 strings, since there can be
/// embedded nulls.
[[deprecated("Use `key = name();` instead.")]] char const* memberName() const;
JSONCPP_DEPRECATED("Use `key = name();` instead.")
char const* memberName() const;
/// Return the member name of the referenced Value, or NULL if it is not an
/// objectValue.
/// \note Better version than memberName(). Allows embedded nulls.