Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Attachments
Attachments
- .clang-format
- 1 kB
- Konrad Grochowski
- CPPLINT.cfg
- 0.7 kB
- Roger Meier
Activity
I used cpplint which is nice to check style.
Attached is a CPPLINT.cfg which excludes lot of filters yet. cpplint passes without warning.
cd compiler/cpp/src cpplint generate/* parse/* windows/* *```
we need to define the filter set we like to have and fix it.
I'd start with lib/cpp, as it looks muuuuch better than compiler. Imho we shouldn't modify all code at once (test coverage is not enough to make sure nothing is broken), but prepare config for future updates - assuming 'new' code will commit by commit replace old one.
Hopefully we'll get to enable most filters (if we're gonna stick with cpplint)
Google's coding standards seems to differ in so many places from standards currently seen in Thrift code, that CPPLINT.cfg has to disable most of filters. So it does check almost nothing...
I'll try with clang-format - it's much more configurable
.clang-format for clang 3.4 (that's what I have in Fedora20 as default)
clang 3.6 has more config options, which would make it even more usable.
We should add a .clang-format file to the source tree and cleanup the code.
clang-format would force us to change existing style, as not everything is yet configurable in it.
Example:
namespace a { namespace b {
would have to become
namespace a { namespace b {
yet I think that is the only thing requiring change. In my branch for C++V2 I've used it on copy of current lib and most files where not changed (apart from namespaces).
If we could accept 'namespace change' than reformating via clang-format is possible,
roger.meier, you can check https://github.com/hcorg/thrift/commit/8b23feefdf37139ccbf31e87c99adfcfe6a07a3f to see how much .clang-format would change current code.
I am not a big fan of 'global reformatting' but sometimes it's better to do it once and then keep it clean.
Also: there are things I don't like about clang-format style, but there's no better tool so I think that switching to it's style it's the best what C++ programmer can do right now
Still, until release of clang 3.6 (which supports // clang-format off) some files (like PlatformSocket.h) will need to be treated with care
If I get some support for that commit I can push it to repo
+1 let's clean this up and keep it tidy
What about test/cpp and tutorial/cpp directory?
I thought about a make style target to automate the clang-format process somehow?
;-r
thanks for remaining about tutorial & test, commit amended: https://github.com/hcorg/thrift/commit/fe88dc1ef4bf0a734e5fb9eb103ca6a791ae96d1
make style sounds good, especially if we could connect other tools for other languages to it. (clang-format supports Java and Java Script, but I've never check how that's work).
Maybe it's possible to create .clang-format consistent with c_glib library...
currently I run clang-format this way, adding it to makefile should be simple:
find tutorial/cpp -name *\.h -or -name *\.cpp -or -name *\.cc | xargs clang-format -i
+1 please commit this including a update of the lib/cpp/README.md about code style and clang-format usage
we can add make style as part of THRIFT-2724
commited, I'll add doc to coding_standards.md in branch later.
make style added (requires clang-format 3.5)
FAILURE: Integrated in Thrift #1357 (See https://builds.apache.org/job/Thrift/1357/)
THRIFT-2729: C++ - .clang-format created and applied (hcorg: rev 74260aa9099c3bb209bc8e524b0e8ba603f62c41)
- lib/cpp/test/ThriftTest_extras.cpp
- lib/cpp/src/thrift/concurrency/Exception.h
- lib/cpp/src/thrift/Thrift.cpp
- lib/cpp/src/thrift/server/TNonblockingServer.cpp
- lib/cpp/src/thrift/transport/TServerSocket.cpp
- compiler/cpp/src/parse/t_typedef.h
- compiler/cpp/src/generate/t_st_generator.cc
- lib/cpp/src/thrift/server/TSimpleServer.h
- lib/cpp/test/RecursiveTest.cpp
- lib/cpp/src/thrift/protocol/TProtocolTap.h
- lib/cpp/src/thrift/concurrency/BoostMonitor.cpp
- lib/cpp/test/concurrency/ThreadManagerTests.h
- lib/cpp/src/thrift/protocol/TDebugProtocol.cpp
- lib/cpp/src/thrift/protocol/TProtocolException.h
- test/cpp/src/StressTestNonBlocking.cpp
- lib/cpp/src/thrift/transport/TSocket.h
- lib/cpp/src/thrift/TLogging.h
- lib/cpp/test/processor/EventLog.h
- lib/cpp/src/thrift/concurrency/Monitor.h
- compiler/cpp/src/parse/t_const_value.h
- compiler/cpp/src/main.h
- configure.ac
- lib/cpp/src/thrift/transport/TServerTransport.h
- lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
- lib/cpp/src/thrift/server/TSimpleServer.cpp
- lib/cpp/src/thrift/Thrift.h
- lib/cpp/src/thrift/transport/TSSLServerSocket.h
- lib/cpp/src/thrift/transport/TSocket.cpp
- lib/cpp/src/thrift/TReflectionLocal.h
- lib/cpp/src/thrift/transport/THttpTransport.h
- lib/cpp/test/RWMutexStarveTest.cpp
- lib/cpp/src/thrift/transport/TFileTransport.h
- lib/cpp/src/thrift/transport/TSSLSocket.h
- lib/cpp/src/thrift/transport/TFDTransport.h
- compiler/cpp/src/parse/t_enum.h
- lib/cpp/src/thrift/TToString.h
- lib/cpp/test/processor/Handlers.h
- compiler/cpp/src/parse/t_type.h
- lib/cpp/src/thrift/TApplicationException.cpp
- lib/cpp/src/thrift/protocol/TMultiplexedProtocol.cpp
- lib/cpp/src/thrift/transport/THttpClient.cpp
- lib/cpp/src/thrift/concurrency/Util.cpp
- compiler/cpp/src/parse/t_struct.h
- compiler/cpp/src/parse/t_container.h
- tutorial/cpp/CppServer.cpp
- lib/cpp/src/thrift/transport/TTransportUtils.cpp
- lib/cpp/src/thrift/transport/THttpTransport.cpp
- compiler/cpp/src/generate/t_as3_generator.cc
- lib/cpp/src/thrift/concurrency/BoostThreadFactory.h
- compiler/cpp/src/parse/t_map.h
- lib/cpp/test/concurrency/TimerManagerTests.h
- compiler/cpp/src/generate/t_hs_generator.cc
- lib/cpp/test/processor/ServerThread.cpp
- lib/cpp/src/thrift/protocol/TProtocol.h
- test/cpp/src/TestServer.cpp
- lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
- lib/cpp/src/thrift/async/TAsyncProcessor.h
- compiler/cpp/src/parse/t_const.h
- lib/cpp/src/thrift/transport/TSocketPool.h
- lib/cpp/src/thrift/protocol/TCompactProtocol.h
- lib/cpp/src/thrift/transport/TSimpleFileTransport.cpp
- lib/cpp/test/processor/ProcessorTest.cpp
- lib/cpp/src/thrift/concurrency/FunctionRunner.h
- lib/cpp/src/thrift/concurrency/Thread.h
- lib/cpp/src/thrift/server/TThreadedServer.cpp
- lib/cpp/src/thrift/processor/PeekProcessor.cpp
- lib/cpp/src/thrift/concurrency/PlatformThreadFactory.h
- lib/cpp/src/thrift/transport/TPipe.cpp
- lib/cpp/src/thrift/concurrency/TimerManager.h
- compiler/cpp/src/main.cc
- lib/cpp/src/thrift/transport/TBufferTransports.cpp
- lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp
- compiler/cpp/src/generate/t_perl_generator.cc
- compiler/cpp/src/parse/t_scope.h
- lib/cpp/test/DebugProtoTest.cpp
- lib/cpp/src/thrift/transport/TSSLSocket.cpp
- compiler/cpp/src/generate/t_js_generator.cc
- compiler/cpp/src/logging.h
- lib/cpp/test/DenseProtoTest.cpp
- lib/cpp/src/thrift/server/TServer.h
- lib/cpp/src/thrift/server/TThreadPoolServer.h
- compiler/cpp/Makefile.am
- compiler/cpp/src/generate/t_cocoa_generator.cc
- lib/cpp/test/Benchmark.cpp
- lib/cpp/src/thrift/concurrency/TimerManager.cpp
- lib/cpp/src/thrift/server/TThreadPoolServer.cpp
- lib/cpp/src/thrift/windows/GetTimeOfDay.h
- compiler/cpp/src/generate/t_rb_generator.cc
- lib/cpp/test/TFileTransportTest.cpp
- lib/cpp/src/thrift/async/TEvhttpServer.cpp
- compiler/cpp/src/parse/t_function.h
- lib/cpp/src/thrift/protocol/TVirtualProtocol.h
- lib/cpp/src/thrift/thrift-config.h
- lib/cpp/src/thrift/server/TNonblockingServer.h
- lib/cpp/src/thrift/transport/TTransportException.h
- test/cpp/Makefile.am
- lib/cpp/test/concurrency/Tests.cpp
- lib/cpp/src/thrift/async/TAsyncChannel.h
- .clang-format
- compiler/cpp/src/generate/t_generator.cc
- lib/cpp/src/thrift/transport/TTransportException.cpp
- lib/cpp/src/thrift/concurrency/PosixThreadFactory.cpp
- lib/cpp/src/thrift/transport/TPipe.h
- lib/cpp/src/thrift/async/TAsyncChannel.cpp
- lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
- lib/cpp/src/thrift/transport/TZlibTransport.cpp
- tutorial/cpp/Makefile.am
- compiler/cpp/src/generate/t_oop_generator.h
- test/cpp/src/ThriftTest_extras.cpp
- lib/cpp/src/thrift/protocol/TBinaryProtocol.h
- compiler/cpp/src/generate/t_xsd_generator.cc
- lib/cpp/src/thrift/async/TAsyncBufferProcessor.h
- lib/cpp/src/thrift/VirtualProfiling.cpp
- compiler/cpp/src/parse/t_program.h
- compiler/cpp/src/generate/t_html_generator.cc
- lib/cpp/src/thrift/transport/TTransport.h
- lib/cpp/test/processor/ServerThread.h
- lib/cpp/src/thrift/transport/TPipeServer.cpp
- compiler/cpp/src/generate/t_generator_registry.h
- compiler/cpp/src/generate/t_json_generator.cc
- lib/cpp/src/thrift/windows/Sync.h
- lib/cpp/test/OpenSSLManualInitTest.cpp
- lib/cpp/src/thrift/transport/TSocketPool.cpp
- lib/cpp/src/thrift/windows/Operators.h
- lib/cpp/test/concurrency/ThreadFactoryTests.h
- compiler/cpp/src/parse/t_set.h
- lib/cpp/src/thrift/transport/THttpServer.h
- compiler/cpp/src/parse/t_doc.h
- lib/cpp/src/thrift/transport/TFDTransport.cpp
- lib/cpp/src/thrift/concurrency/Mutex.cpp
- lib/cpp/src/thrift/concurrency/StdThreadFactory.h
- lib/cpp/src/thrift/protocol/TMultiplexedProtocol.h
- lib/cpp/src/thrift/windows/TWinsockSingleton.h
- lib/cpp/src/thrift/transport/TShortReadTransport.h
- compiler/cpp/src/parse/t_enum_value.h
- lib/cpp/test/EnumTest.cpp
- test/cpp/src/StressTest.cpp
- lib/cpp/src/thrift/transport/TBufferTransports.h
- lib/cpp/src/thrift/protocol/TDenseProtocol.cpp
- lib/cpp/src/thrift/concurrency/StdMonitor.cpp
- compiler/cpp/src/generate/t_go_generator.cc
- lib/cpp/test/DebugProtoTest_extras.cpp
- compiler/cpp/src/generate/t_cpp_generator.cc
- lib/cpp/test/TransportTest.cpp
- lib/cpp/src/thrift/server/TServer.cpp
- compiler/cpp/src/parse/t_service.h
- lib/cpp/src/thrift/cxxfunctional.h
- tutorial/cpp/CppClient.cpp
- lib/cpp/src/thrift/async/TAsyncDispatchProcessor.h
- compiler/cpp/src/parse/t_base_type.h
- lib/cpp/src/thrift/protocol/TProtocolDecorator.h
- lib/cpp/test/SpecializationTest.cpp
- compiler/cpp/src/generate/t_erl_generator.cc
- lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h
- lib/cpp/src/thrift/windows/WinFcntl.h
- lib/cpp/src/thrift/concurrency/BoostMutex.cpp
- lib/cpp/src/thrift/windows/SocketPair.cpp
- compiler/cpp/src/generate/t_haxe_generator.cc
- compiler/cpp/src/parse/t_field.h
- lib/cpp/src/thrift/server/TThreadedServer.h
- lib/cpp/src/thrift/transport/TTransportUtils.h
- lib/cpp/test/ToStringTest.cpp
- compiler/cpp/src/generate/t_gv_generator.cc
- lib/cpp/src/thrift/processor/PeekProcessor.h
- compiler/cpp/src/generate/t_html_generator.h
- lib/cpp/src/thrift/qt/TQTcpServer.h
- lib/cpp/src/thrift/transport/THttpClient.h
- lib/cpp/src/thrift/transport/TVirtualTransport.h
- lib/cpp/src/thrift/protocol/TDenseProtocol.h
- lib/cpp/src/thrift/concurrency/ThreadManager.h
- lib/cpp/src/thrift/protocol/TJSONProtocol.h
- lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp
- compiler/cpp/src/generate/t_c_glib_generator.cc
- lib/cpp/src/thrift/transport/TSSLServerSocket.cpp
- lib/cpp/src/thrift/qt/TQIODeviceTransport.h
- lib/cpp/test/GenericHelpers.h
- lib/cpp/src/thrift/concurrency/PosixThreadFactory.h
- compiler/cpp/src/generate/t_delphi_generator.cc
- lib/cpp/src/thrift/windows/WinFcntl.cpp
- lib/cpp/src/thrift/async/TAsyncProtocolProcessor.cpp
- lib/cpp/src/thrift/async/TEvhttpClientChannel.h
- lib/cpp/src/thrift/concurrency/ThreadManager.cpp
- lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
- compiler/cpp/src/generate/t_csharp_generator.cc
- lib/cpp/src/thrift/transport/THttpServer.cpp
- compiler/cpp/src/generate/t_lua_generator.cc
- lib/cpp/src/thrift/protocol/TDebugProtocol.h
- lib/cpp/src/thrift/async/TEvhttpServer.h
- compiler/cpp/src/generate/t_java_generator.cc
- lib/cpp/src/thrift/concurrency/StdMutex.cpp
- compiler/cpp/src/parse/t_list.h
- lib/cpp/src/thrift/windows/OverlappedSubmissionThread.cpp
- lib/cpp/src/thrift/windows/config.h
- compiler/cpp/src/generate/t_generator.h
- lib/cpp/test/TMemoryBufferTest.cpp
- lib/cpp/src/thrift/transport/TPipeServer.h
- compiler/cpp/src/generate/t_javame_generator.cc
- compiler/cpp/src/generate/t_ocaml_generator.cc
- lib/cpp/src/thrift/transport/PlatformSocket.h
- lib/cpp/src/thrift/transport/TFileTransport.cpp
- lib/cpp/src/thrift/TDispatchProcessor.h
- lib/cpp/src/thrift/TApplicationException.h
- compiler/cpp/src/windows/config.h
- lib/cpp/src/thrift/transport/TZlibTransport.h
- lib/cpp/src/thrift/processor/TMultiplexedProcessor.h
- test/cpp/src/TestClient.cpp
- lib/cpp/src/thrift/async/TAsyncProtocolProcessor.h
- lib/cpp/Makefile.am
- lib/cpp/src/thrift/processor/StatsProcessor.h
- lib/cpp/test/AllProtocolTests.tcc
- compiler/cpp/src/generate/t_php_generator.cc
- lib/cpp/src/thrift/concurrency/Monitor.cpp
- lib/cpp/src/thrift/protocol/TBase64Utils.h
- lib/cpp/src/thrift/transport/TSimpleFileTransport.h
- lib/cpp/test/OptionalRequiredTest.cpp
- lib/cpp/src/thrift/concurrency/Util.h
- lib/cpp/test/ZlibTest.cpp
- compiler/cpp/src/md5.h
- compiler/cpp/src/generate/t_d_generator.cc
- lib/cpp/src/thrift/transport/TServerSocket.h
- lib/cpp/src/thrift/windows/GetTimeOfDay.cpp
- lib/cpp/test/JSONProtoTest.cpp
- lib/cpp/src/thrift/concurrency/Mutex.h
- lib/cpp/test/AllProtocolTests.cpp
- lib/cpp/test/TPipedTransportTest.cpp
- lib/cpp/test/processor/EventLog.cpp
- compiler/cpp/src/generate/t_py_generator.cc
- lib/cpp/src/thrift/TProcessor.h
- lib/cpp/test/TFDTransportTest.cpp
- compiler/cpp/src/parse/parse.cc
- lib/cpp/src/thrift/windows/TWinsockSingleton.cpp
- lib/cpp/test/Base64Test.cpp
- lib/cpp/src/thrift/protocol/TBase64Utils.cpp
- lib/cpp/src/thrift/qt/TQTcpServer.cpp
- compiler/cpp/src/globals.h
SUCCESS: Integrated in Thrift #1358 (See https://builds.apache.org/job/Thrift/1358/)
Revert "THRIFT-2729: C++ - .clang-format created and applied" (hcorg: rev 240120c8434b49d1f76d207aff4e3530d3ada14b)
- lib/cpp/src/thrift/protocol/TVirtualProtocol.h
- lib/cpp/src/thrift/transport/TTransportUtils.cpp
- compiler/cpp/src/parse/t_field.h
- lib/cpp/src/thrift/async/TEvhttpClientChannel.h
- compiler/cpp/src/parse/parse.cc
- lib/cpp/src/thrift/transport/TSSLSocket.h
- lib/cpp/src/thrift/thrift-config.h
- lib/cpp/src/thrift/transport/TSSLServerSocket.h
- lib/cpp/src/thrift/protocol/TMultiplexedProtocol.h
- lib/cpp/src/thrift/server/TNonblockingServer.cpp
- lib/cpp/test/ToStringTest.cpp
- lib/cpp/test/JSONProtoTest.cpp
- lib/cpp/src/thrift/concurrency/StdMutex.cpp
- lib/cpp/src/thrift/async/TAsyncChannel.h
- compiler/cpp/src/main.h
- lib/cpp/src/thrift/server/TSimpleServer.h
- lib/cpp/src/thrift/concurrency/Mutex.h
- lib/cpp/src/thrift/concurrency/Thread.h
- lib/cpp/test/concurrency/ThreadManagerTests.h
- lib/cpp/test/RWMutexStarveTest.cpp
- compiler/cpp/src/parse/t_set.h
- lib/cpp/src/thrift/transport/TSimpleFileTransport.cpp
- compiler/cpp/src/generate/t_generator.cc
- lib/cpp/test/processor/EventLog.cpp
- lib/cpp/test/DenseProtoTest.cpp
- compiler/cpp/Makefile.am
- lib/cpp/src/thrift/transport/TServerSocket.h
- lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
- compiler/cpp/src/generate/t_hs_generator.cc
- lib/cpp/src/thrift/protocol/TProtocol.h
- lib/cpp/test/processor/ServerThread.h
- lib/cpp/src/thrift/transport/TTransportException.cpp
- test/cpp/src/ThriftTest_extras.cpp
- lib/cpp/test/GenericHelpers.h
- compiler/cpp/src/parse/t_map.h
- compiler/cpp/src/generate/t_d_generator.cc
- lib/cpp/src/thrift/server/TSimpleServer.cpp
- lib/cpp/src/thrift/transport/PlatformSocket.h
- lib/cpp/src/thrift/protocol/TBinaryProtocol.h
- test/cpp/src/TestClient.cpp
- lib/cpp/src/thrift/protocol/TProtocolException.h
- lib/cpp/src/thrift/concurrency/PosixThreadFactory.cpp
- compiler/cpp/src/generate/t_as3_generator.cc
- lib/cpp/src/thrift/processor/TMultiplexedProcessor.h
- tutorial/cpp/CppServer.cpp
- lib/cpp/test/OpenSSLManualInitTest.cpp
- lib/cpp/src/thrift/concurrency/Util.h
- lib/cpp/src/thrift/concurrency/ThreadManager.h
- test/cpp/Makefile.am
- compiler/cpp/src/generate/t_xsd_generator.cc
- lib/cpp/src/thrift/concurrency/BoostMonitor.cpp
- compiler/cpp/src/parse/t_function.h
- lib/cpp/src/thrift/transport/TSocket.h
- compiler/cpp/src/parse/t_type.h
- lib/cpp/test/TPipedTransportTest.cpp
- compiler/cpp/src/generate/t_oop_generator.h
- compiler/cpp/src/logging.h
- lib/cpp/src/thrift/transport/TSSLServerSocket.cpp
- lib/cpp/src/thrift/transport/TServerTransport.h
- lib/cpp/src/thrift/transport/TSSLSocket.cpp
- compiler/cpp/src/parse/t_scope.h
- lib/cpp/src/thrift/transport/TServerSocket.cpp
- lib/cpp/src/thrift/processor/PeekProcessor.h
- lib/cpp/src/thrift/transport/TTransportException.h
- compiler/cpp/src/generate/t_ocaml_generator.cc
- lib/cpp/src/thrift/concurrency/ThreadManager.cpp
- lib/cpp/src/thrift/windows/GetTimeOfDay.cpp
- lib/cpp/test/OptionalRequiredTest.cpp
- lib/cpp/src/thrift/async/TEvhttpServer.h
- lib/cpp/src/thrift/transport/TShortReadTransport.h
- compiler/cpp/src/parse/t_const_value.h
- lib/cpp/test/ThriftTest_extras.cpp
- lib/cpp/src/thrift/concurrency/Util.cpp
- compiler/cpp/src/generate/t_html_generator.h
- compiler/cpp/src/generate/t_cpp_generator.cc
- lib/cpp/test/TFDTransportTest.cpp
- lib/cpp/src/thrift/protocol/TDenseProtocol.h
- lib/cpp/src/thrift/protocol/TJSONProtocol.h
- lib/cpp/src/thrift/windows/SocketPair.cpp
- lib/cpp/test/TFileTransportTest.cpp
- lib/cpp/src/thrift/async/TAsyncProtocolProcessor.cpp
- compiler/cpp/src/parse/t_doc.h
- lib/cpp/src/thrift/concurrency/BoostThreadFactory.h
- configure.ac
- lib/cpp/src/thrift/protocol/TProtocolDecorator.h
- lib/cpp/src/thrift/windows/TWinsockSingleton.h
- compiler/cpp/src/generate/t_js_generator.cc
- lib/cpp/src/thrift/concurrency/Mutex.cpp
- lib/cpp/src/thrift/concurrency/Exception.h
- lib/cpp/test/concurrency/ThreadFactoryTests.h
- lib/cpp/src/thrift/transport/TFDTransport.h
- lib/cpp/src/thrift/TReflectionLocal.h
- lib/cpp/test/AllProtocolTests.cpp
- lib/cpp/src/thrift/transport/TPipe.cpp
- test/cpp/src/StressTestNonBlocking.cpp
- lib/cpp/src/thrift/windows/Operators.h
- lib/cpp/src/thrift/transport/TZlibTransport.cpp
- lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
- compiler/cpp/src/main.cc
- lib/cpp/src/thrift/async/TAsyncBufferProcessor.h
- compiler/cpp/src/parse/t_base_type.h
- compiler/cpp/src/generate/t_html_generator.cc
- compiler/cpp/src/generate/t_st_generator.cc
- lib/cpp/test/processor/EventLog.h
- lib/cpp/src/thrift/concurrency/StdMonitor.cpp
- compiler/cpp/src/generate/t_java_generator.cc
- lib/cpp/src/thrift/TApplicationException.h
- lib/cpp/src/thrift/windows/OverlappedSubmissionThread.cpp
- compiler/cpp/src/parse/t_enum_value.h
- lib/cpp/src/thrift/concurrency/FunctionRunner.h
- tutorial/cpp/Makefile.am
- lib/cpp/test/concurrency/Tests.cpp
- lib/cpp/src/thrift/protocol/TDebugProtocol.h
- lib/cpp/src/thrift/qt/TQTcpServer.cpp
- lib/cpp/test/AllProtocolTests.tcc
- lib/cpp/src/thrift/concurrency/BoostMutex.cpp
- lib/cpp/src/thrift/transport/TSocketPool.h
- lib/cpp/src/thrift/transport/TBufferTransports.h
- lib/cpp/test/processor/ProcessorTest.cpp
- lib/cpp/src/thrift/async/TEvhttpServer.cpp
- compiler/cpp/src/parse/t_const.h
- compiler/cpp/src/parse/t_struct.h
- compiler/cpp/src/generate/t_csharp_generator.cc
- lib/cpp/src/thrift/transport/TVirtualTransport.h
- lib/cpp/src/thrift/transport/THttpServer.cpp
- lib/cpp/src/thrift/server/TThreadPoolServer.cpp
- lib/cpp/src/thrift/transport/TPipeServer.cpp
- compiler/cpp/src/parse/t_list.h
- lib/cpp/test/Base64Test.cpp
- compiler/cpp/src/generate/t_gv_generator.cc
- lib/cpp/src/thrift/server/TThreadedServer.cpp
- lib/cpp/test/DebugProtoTest.cpp
- lib/cpp/src/thrift/async/TAsyncProcessor.h
- compiler/cpp/src/parse/t_enum.h
- lib/cpp/src/thrift/transport/TSimpleFileTransport.h
- lib/cpp/src/thrift/async/TAsyncDispatchProcessor.h
- lib/cpp/src/thrift/windows/Sync.h
- lib/cpp/src/thrift/transport/TBufferTransports.cpp
- lib/cpp/src/thrift/processor/PeekProcessor.cpp
- lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp
- lib/cpp/test/Benchmark.cpp
- lib/cpp/src/thrift/TProcessor.h
- lib/cpp/src/thrift/TToString.h
- compiler/cpp/src/generate/t_generator.h
- lib/cpp/src/thrift/transport/TSocketPool.cpp
- tutorial/cpp/CppClient.cpp
- compiler/cpp/src/windows/config.h
- lib/cpp/src/thrift/server/TServer.cpp
- lib/cpp/src/thrift/protocol/TBase64Utils.cpp
- lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
- compiler/cpp/src/generate/t_c_glib_generator.cc
- lib/cpp/src/thrift/concurrency/Monitor.cpp
- lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
- lib/cpp/test/SpecializationTest.cpp
- lib/cpp/src/thrift/transport/TSocket.cpp
- lib/cpp/src/thrift/processor/StatsProcessor.h
- lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h
- lib/cpp/src/thrift/concurrency/Monitor.h
- compiler/cpp/src/generate/t_json_generator.cc
- .clang-format
- compiler/cpp/src/generate/t_go_generator.cc
- compiler/cpp/src/globals.h
- lib/cpp/test/processor/ServerThread.cpp
- lib/cpp/src/thrift/windows/GetTimeOfDay.h
- lib/cpp/test/DebugProtoTest_extras.cpp
- lib/cpp/src/thrift/Thrift.cpp
- lib/cpp/src/thrift/async/TAsyncChannel.cpp
- lib/cpp/src/thrift/protocol/TProtocolTap.h
- lib/cpp/src/thrift/windows/TWinsockSingleton.cpp
- compiler/cpp/src/parse/t_service.h
- lib/cpp/test/EnumTest.cpp
- lib/cpp/src/thrift/qt/TQTcpServer.h
- lib/cpp/test/processor/Handlers.h
- lib/cpp/src/thrift/VirtualProfiling.cpp
- compiler/cpp/src/parse/t_container.h
- lib/cpp/Makefile.am
- compiler/cpp/src/generate/t_py_generator.cc
- lib/cpp/src/thrift/concurrency/TimerManager.cpp
- lib/cpp/src/thrift/TDispatchProcessor.h
- lib/cpp/src/thrift/transport/TFDTransport.cpp
- lib/cpp/src/thrift/TLogging.h
- lib/cpp/src/thrift/qt/TQIODeviceTransport.h
- compiler/cpp/src/generate/t_erl_generator.cc
- lib/cpp/src/thrift/protocol/TBase64Utils.h
- lib/cpp/src/thrift/transport/TZlibTransport.h
- lib/cpp/src/thrift/TApplicationException.cpp
- lib/cpp/src/thrift/server/TThreadPoolServer.h
- lib/cpp/src/thrift/transport/TFileTransport.h
- lib/cpp/src/thrift/server/TServer.h
- lib/cpp/src/thrift/protocol/TMultiplexedProtocol.cpp
- lib/cpp/src/thrift/cxxfunctional.h
- test/cpp/src/TestServer.cpp
- compiler/cpp/src/generate/t_cocoa_generator.cc
- lib/cpp/src/thrift/transport/THttpTransport.cpp
- lib/cpp/src/thrift/protocol/TDenseProtocol.cpp
- test/cpp/src/StressTest.cpp
- compiler/cpp/src/generate/t_rb_generator.cc
- lib/cpp/src/thrift/windows/config.h
- lib/cpp/src/thrift/transport/TTransportUtils.h
- lib/cpp/src/thrift/transport/TTransport.h
- lib/cpp/src/thrift/transport/TPipeServer.h
- lib/cpp/src/thrift/windows/WinFcntl.cpp
- lib/cpp/src/thrift/transport/THttpTransport.h
- lib/cpp/src/thrift/concurrency/PosixThreadFactory.h
- lib/cpp/src/thrift/async/TAsyncProtocolProcessor.h
- lib/cpp/src/thrift/concurrency/TimerManager.h
- lib/cpp/src/thrift/server/TNonblockingServer.h
- lib/cpp/src/thrift/concurrency/PlatformThreadFactory.h
- lib/cpp/src/thrift/protocol/TDebugProtocol.cpp
- compiler/cpp/src/generate/t_php_generator.cc
- lib/cpp/src/thrift/protocol/TCompactProtocol.h
- lib/cpp/test/concurrency/TimerManagerTests.h
- lib/cpp/src/thrift/transport/TFileTransport.cpp
- lib/cpp/test/ZlibTest.cpp
- compiler/cpp/src/generate/t_generator_registry.h
- lib/cpp/test/TransportTest.cpp
- lib/cpp/test/RecursiveTest.cpp
- lib/cpp/src/thrift/Thrift.h
- compiler/cpp/src/parse/t_program.h
- lib/cpp/src/thrift/transport/THttpClient.cpp
- compiler/cpp/src/generate/t_haxe_generator.cc
- lib/cpp/src/thrift/server/TThreadedServer.h
- lib/cpp/src/thrift/transport/THttpServer.h
- lib/cpp/src/thrift/transport/THttpClient.h
- compiler/cpp/src/generate/t_javame_generator.cc
- compiler/cpp/src/generate/t_perl_generator.cc
- lib/cpp/test/TMemoryBufferTest.cpp
- compiler/cpp/src/generate/t_delphi_generator.cc
- lib/cpp/src/thrift/concurrency/StdThreadFactory.h
- lib/cpp/src/thrift/transport/TPipe.h
- lib/cpp/src/thrift/windows/WinFcntl.h
- compiler/cpp/src/parse/t_typedef.h
- lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp
- compiler/cpp/src/generate/t_lua_generator.cc
- compiler/cpp/src/md5.h
SUCCESS: Integrated in Thrift #1359 (See https://builds.apache.org/job/Thrift/1359/)
THRIFT-2729: C++ - .clang-format created and applied (hcorg: rev 16a23a6618754a5a87aeb8df99a72516b0272fb3)
- lib/cpp/src/thrift/transport/TTransportException.h
- test/cpp/src/StressTestNonBlocking.cpp
- lib/cpp/src/thrift/protocol/TProtocolDecorator.h
- tutorial/cpp/CppServer.cpp
- lib/cpp/src/thrift/async/TAsyncDispatchProcessor.h
- lib/cpp/src/thrift/processor/TMultiplexedProcessor.h
- lib/cpp/test/TFDTransportTest.cpp
- lib/cpp/src/thrift/TReflectionLocal.h
- lib/cpp/test/processor/EventLog.cpp
- lib/cpp/src/thrift/windows/WinFcntl.cpp
- lib/cpp/src/thrift/protocol/TProtocolTap.h
- lib/cpp/test/DenseProtoTest.cpp
- lib/cpp/src/thrift/cxxfunctional.h
- lib/cpp/test/Base64Test.cpp
- lib/cpp/src/thrift/transport/THttpClient.cpp
- lib/cpp/test/concurrency/ThreadManagerTests.h
- lib/cpp/src/thrift/processor/StatsProcessor.h
- lib/cpp/src/thrift/transport/TSocket.cpp
- lib/cpp/src/thrift/windows/GetTimeOfDay.h
- compiler/cpp/src/parse/t_list.h
- lib/cpp/src/thrift/protocol/TProtocolException.h
- lib/cpp/test/processor/Handlers.h
- lib/cpp/src/thrift/async/TAsyncProtocolProcessor.cpp
- compiler/cpp/src/generate/t_ocaml_generator.cc
- lib/cpp/src/thrift/VirtualProfiling.cpp
- lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
- compiler/cpp/src/parse/t_enum.h
- compiler/cpp/src/generate/t_cpp_generator.cc
- lib/cpp/src/thrift/windows/TWinsockSingleton.cpp
- lib/cpp/src/thrift/protocol/TMultiplexedProtocol.cpp
- lib/cpp/src/thrift/concurrency/Mutex.cpp
- lib/cpp/src/thrift/server/TNonblockingServer.h
- lib/cpp/src/thrift/transport/TSSLServerSocket.cpp
- lib/cpp/src/thrift/qt/TQIODeviceTransport.h
- test/cpp/src/TestClient.cpp
- lib/cpp/test/ZlibTest.cpp
- lib/cpp/src/thrift/thrift-config.h
- lib/cpp/src/thrift/transport/TSocket.h
- lib/cpp/test/processor/EventLog.h
- lib/cpp/src/thrift/concurrency/Util.cpp
- lib/cpp/src/thrift/concurrency/Monitor.cpp
- lib/cpp/src/thrift/TLogging.h
- compiler/cpp/src/generate/t_html_generator.h
- lib/cpp/src/thrift/transport/TBufferTransports.h
- lib/cpp/src/thrift/concurrency/PlatformThreadFactory.h
- compiler/cpp/src/generate/t_rb_generator.cc
- compiler/cpp/src/generate/t_gv_generator.cc
- lib/cpp/test/AllProtocolTests.cpp
- compiler/cpp/src/md5.h
- lib/cpp/test/TPipedTransportTest.cpp
- lib/cpp/test/OptionalRequiredTest.cpp
- lib/cpp/src/thrift/windows/WinFcntl.h
- lib/cpp/src/thrift/qt/TQTcpServer.h
- lib/cpp/src/thrift/windows/Operators.h
- compiler/cpp/src/generate/t_generator_registry.h
- lib/cpp/src/thrift/server/TThreadPoolServer.cpp
- lib/cpp/src/thrift/transport/TPipeServer.cpp
- lib/cpp/src/thrift/concurrency/StdMutex.cpp
- lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
- lib/cpp/src/thrift/Thrift.h
- lib/cpp/src/thrift/transport/TPipe.h
- lib/cpp/src/thrift/protocol/TCompactProtocol.h
- lib/cpp/Makefile.am
- compiler/cpp/src/generate/t_javame_generator.cc
- lib/cpp/src/thrift/transport/TServerSocket.h
- compiler/cpp/src/generate/t_generator.h
- compiler/cpp/src/main.h
- lib/cpp/src/thrift/transport/TTransportUtils.h
- lib/cpp/src/thrift/transport/TFDTransport.cpp
- tutorial/cpp/CppClient.cpp
- lib/cpp/test/concurrency/Tests.cpp
- lib/cpp/src/thrift/protocol/TMultiplexedProtocol.h
- lib/cpp/src/thrift/protocol/TDenseProtocol.h
- compiler/cpp/src/parse/t_field.h
- lib/cpp/src/thrift/transport/TFileTransport.cpp
- lib/cpp/src/thrift/concurrency/PosixThreadFactory.cpp
- lib/cpp/src/thrift/TProcessor.h
- lib/cpp/test/AllProtocolTests.tcc
- lib/cpp/src/thrift/async/TAsyncChannel.cpp
- compiler/cpp/src/generate/t_js_generator.cc
- lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
- compiler/cpp/src/generate/t_erl_generator.cc
- lib/cpp/src/thrift/transport/TSSLServerSocket.h
- lib/cpp/src/thrift/qt/TQTcpServer.cpp
- lib/cpp/src/thrift/transport/PlatformSocket.h
- lib/cpp/src/thrift/server/TThreadedServer.h
- lib/cpp/src/thrift/windows/Sync.h
- compiler/cpp/src/main.cc
- lib/cpp/src/thrift/processor/PeekProcessor.h
- lib/cpp/src/thrift/TApplicationException.h
- lib/cpp/src/thrift/concurrency/BoostThreadFactory.h
- compiler/cpp/src/parse/t_const_value.h
- lib/cpp/src/thrift/transport/TSimpleFileTransport.h
- lib/cpp/src/thrift/async/TEvhttpClientChannel.h
- compiler/cpp/src/parse/t_type.h
- lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp
- compiler/cpp/src/parse/t_enum_value.h
- compiler/cpp/src/generate/t_generator.cc
- lib/cpp/src/thrift/transport/TTransport.h
- tutorial/cpp/Makefile.am
- compiler/cpp/src/generate/t_d_generator.cc
- compiler/cpp/src/generate/t_as3_generator.cc
- lib/cpp/src/thrift/transport/TShortReadTransport.h
- lib/cpp/src/thrift/transport/THttpTransport.cpp
- lib/cpp/src/thrift/transport/TSocketPool.cpp
- lib/cpp/src/thrift/transport/TPipe.cpp
- compiler/cpp/src/generate/t_cocoa_generator.cc
- lib/cpp/src/thrift/protocol/TBinaryProtocol.h
- lib/cpp/src/thrift/transport/THttpServer.h
- lib/cpp/src/thrift/protocol/TDebugProtocol.cpp
- lib/cpp/test/RecursiveTest.cpp
- lib/cpp/src/thrift/TApplicationException.cpp
- lib/cpp/test/OpenSSLManualInitTest.cpp
- lib/cpp/test/concurrency/TimerManagerTests.h
- lib/cpp/test/DebugProtoTest.cpp
- lib/cpp/src/thrift/Thrift.cpp
- lib/cpp/test/concurrency/ThreadFactoryTests.h
- lib/cpp/test/ThriftTest_extras.cpp
- lib/cpp/src/thrift/concurrency/TimerManager.cpp
- compiler/cpp/src/windows/config.h
- lib/cpp/src/thrift/concurrency/Monitor.h
- lib/cpp/test/SpecializationTest.cpp
- lib/cpp/test/RWMutexStarveTest.cpp
- lib/cpp/src/thrift/transport/TTransportUtils.cpp
- compiler/cpp/src/generate/t_html_generator.cc
- lib/cpp/src/thrift/transport/TSSLSocket.cpp
- lib/cpp/test/ToStringTest.cpp
- lib/cpp/src/thrift/concurrency/ThreadManager.h
- lib/cpp/src/thrift/concurrency/BoostMutex.cpp
- lib/cpp/src/thrift/transport/THttpClient.h
- compiler/cpp/src/parse/t_base_type.h
- lib/cpp/src/thrift/transport/THttpTransport.h
- test/cpp/src/TestServer.cpp
- lib/cpp/test/processor/ProcessorTest.cpp
- lib/cpp/src/thrift/transport/TSimpleFileTransport.cpp
- compiler/cpp/src/parse/t_set.h
- lib/cpp/test/TransportTest.cpp
- lib/cpp/src/thrift/transport/TServerTransport.h
- lib/cpp/src/thrift/transport/TFileTransport.h
- lib/cpp/src/thrift/transport/TServerSocket.cpp
- lib/cpp/src/thrift/concurrency/TimerManager.h
- lib/cpp/src/thrift/server/TThreadedServer.cpp
- lib/cpp/test/EnumTest.cpp
- compiler/cpp/src/generate/t_go_generator.cc
- compiler/cpp/src/parse/t_scope.h
- lib/cpp/src/thrift/transport/TPipeServer.h
- lib/cpp/src/thrift/windows/OverlappedSubmissionThread.cpp
- lib/cpp/src/thrift/windows/SocketPair.cpp
- compiler/cpp/src/generate/t_php_generator.cc
- lib/cpp/src/thrift/concurrency/StdMonitor.cpp
- compiler/cpp/src/generate/t_xsd_generator.cc
- lib/cpp/src/thrift/async/TAsyncProtocolProcessor.h
- compiler/cpp/src/generate/t_java_generator.cc
- lib/cpp/src/thrift/async/TAsyncProcessor.h
- compiler/cpp/src/parse/t_service.h
- lib/cpp/test/DebugProtoTest_extras.cpp
- lib/cpp/src/thrift/async/TAsyncChannel.h
- lib/cpp/src/thrift/protocol/TVirtualProtocol.h
- compiler/cpp/src/generate/t_c_glib_generator.cc
- compiler/cpp/src/generate/t_lua_generator.cc
- lib/cpp/src/thrift/protocol/TProtocol.h
- lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
- lib/cpp/src/thrift/concurrency/FunctionRunner.h
- lib/cpp/src/thrift/server/TNonblockingServer.cpp
- compiler/cpp/src/parse/t_doc.h
- lib/cpp/src/thrift/concurrency/Mutex.h
- lib/cpp/src/thrift/TDispatchProcessor.h
- lib/cpp/src/thrift/protocol/TBase64Utils.cpp
- compiler/cpp/src/generate/t_json_generator.cc
- lib/cpp/src/thrift/concurrency/ThreadManager.cpp
- lib/cpp/src/thrift/concurrency/Util.h
- lib/cpp/src/thrift/server/TThreadPoolServer.h
- configure.ac
- compiler/cpp/src/parse/t_struct.h
- lib/cpp/src/thrift/transport/TFDTransport.h
- lib/cpp/src/thrift/transport/TZlibTransport.cpp
- lib/cpp/src/thrift/concurrency/PosixThreadFactory.h
- compiler/cpp/src/generate/t_hs_generator.cc
- lib/cpp/src/thrift/server/TServer.cpp
- lib/cpp/src/thrift/async/TAsyncBufferProcessor.h
- compiler/cpp/Makefile.am
- compiler/cpp/src/generate/t_st_generator.cc
- compiler/cpp/src/generate/t_oop_generator.h
- test/cpp/src/StressTest.cpp
- compiler/cpp/src/parse/t_typedef.h
- lib/cpp/src/thrift/async/TEvhttpServer.cpp
- compiler/cpp/src/generate/t_delphi_generator.cc
- lib/cpp/src/thrift/transport/TSSLSocket.h
- compiler/cpp/src/generate/t_py_generator.cc
- lib/cpp/src/thrift/concurrency/BoostMonitor.cpp
- compiler/cpp/src/generate/t_csharp_generator.cc
- compiler/cpp/src/logging.h
- lib/cpp/src/thrift/TToString.h
- test/cpp/Makefile.am
- test/cpp/src/ThriftTest_extras.cpp
- lib/cpp/test/processor/ServerThread.h
- lib/cpp/src/thrift/transport/TTransportException.cpp
- lib/cpp/test/TFileTransportTest.cpp
- compiler/cpp/src/parse/parse.cc
- lib/cpp/src/thrift/protocol/TDebugProtocol.h
- compiler/cpp/src/parse/t_program.h
- lib/cpp/src/thrift/processor/PeekProcessor.cpp
- lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp
- lib/cpp/src/thrift/server/TServer.h
- compiler/cpp/src/parse/t_map.h
- lib/cpp/src/thrift/concurrency/Exception.h
- lib/cpp/src/thrift/windows/TWinsockSingleton.h
- .clang-format
- lib/cpp/test/GenericHelpers.h
- compiler/cpp/src/parse/t_function.h
- compiler/cpp/src/generate/t_haxe_generator.cc
- lib/cpp/src/thrift/windows/config.h
- lib/cpp/src/thrift/server/TSimpleServer.cpp
- lib/cpp/src/thrift/protocol/TBase64Utils.h
- lib/cpp/test/Benchmark.cpp
- lib/cpp/src/thrift/concurrency/Thread.h
- compiler/cpp/src/parse/t_const.h
- lib/cpp/src/thrift/concurrency/StdThreadFactory.h
- lib/cpp/test/JSONProtoTest.cpp
- lib/cpp/src/thrift/transport/TSocketPool.h
- compiler/cpp/src/parse/t_container.h
- compiler/cpp/src/globals.h
- lib/cpp/src/thrift/protocol/TJSONProtocol.h
- lib/cpp/src/thrift/windows/GetTimeOfDay.cpp
- lib/cpp/test/TMemoryBufferTest.cpp
- compiler/cpp/src/generate/t_perl_generator.cc
- lib/cpp/src/thrift/transport/TBufferTransports.cpp
- lib/cpp/src/thrift/transport/THttpServer.cpp
- lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h
- lib/cpp/src/thrift/transport/TVirtualTransport.h
- lib/cpp/src/thrift/transport/TZlibTransport.h
- lib/cpp/src/thrift/async/TEvhttpServer.h
- lib/cpp/test/processor/ServerThread.cpp
- lib/cpp/src/thrift/protocol/TDenseProtocol.cpp
- lib/cpp/src/thrift/server/TSimpleServer.h
thanks, I hope I'll be able to find more such tools for other libs (clang-format can be used also for java and javascript, but I have to check how it behaves)
GitHub user cvlchinet opened a pull request:
https://github.com/apache/thrift/pull/295
Fix readability in Go generator
Because of auto-formatting the source code from https://issues.apache.org/jira/browse/THRIFT-2729 the source writing part of the Go generator is cluttered and barely readable.
This PR sets line breaks in appropriate positions to make it a lot more readable and maintainable.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cvlchinet/thrift go-fix-readability
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/295.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #295
commit 4fed6698a9df36c99dbb5468835d1cf9467a10ad
Author: Chi Vinh Le <cvl@chinet.info>
Date: 2014-11-29T13:39:10Z
Increase readability in go generator
note: add a point do not use C-style casts