Skip to content

Commit 136bae5

Browse files
committed
fix linter violations
1 parent 1764523 commit 136bae5

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

Makefile.am

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ valgrind: check
3030
valgrind --leak-check=full --error-exitcode=1 ./test-program
3131

3232
lint:
33-
cpplint --filter=-legal/copyright --root=$(CURDIR) include/restclient-cpp/*.h source/*.cc
33+
# Filter reasons:
34+
# legal/copyright: it's just maintenance overhead to have license headers
35+
# in all files
36+
# whitespace/indent_namespace: it makes code less readable if indentations
37+
# in namespaces are not allowed
38+
cpplint --filter="-legal/copyright,-whitespace/indent_namespace" --root=$(CURDIR) include/restclient-cpp/*.h source/*.cc
3439

3540
docker-services:
3641
[ -n "$$(docker ps --quiet --filter name=restclient-cpp-httpbin)" ] || \

source/connection.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88

99
#include <curl/curl.h>
1010

11+
#include <algorithm>
1112
#include <cstring>
12-
#include <string>
1313
#include <iostream>
1414
#include <map>
1515
#include <stdexcept>
16+
#include <string>
1617
#include <utility>
1718

1819
#include "restclient-cpp/restclient.h"
@@ -378,7 +379,7 @@ RestClient::Connection::performCurlRequest(const std::string& uri) {
378379
*
379380
* @param uri URI to query
380381
* @param ret Reference to the response struct that should be filled
381-
*
382+
*
382383
* @return reference to response struct for chaining
383384
*/
384385
RestClient::Response*
@@ -571,7 +572,7 @@ RestClient::Connection::get(const std::string& url) {
571572
*
572573
* @param url to query
573574
* @param response struct
574-
*
575+
*
575576
* @return response struct ref for chaining
576577
*/
577578
RestClient::Response*

source/helpers.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "restclient-cpp/helpers.h"
88

99
#include <cstring>
10+
#include <string>
1011

1112
#include "restclient-cpp/restclient.h"
1213

source/restclient.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#if __cplusplus >= 201402L
1818
#include <memory>
1919
#endif
20+
#include <string>
21+
2022

2123
#include "restclient-cpp/version.h"
2224
#include "restclient-cpp/connection.h"

0 commit comments

Comments
 (0)