Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Style refactor all .cpp filenames + adjust license formatting for clang-format #280

Closed
1 task done
anonimal opened this issue Jul 30, 2016 · 5 comments
Closed
1 task done

Comments

@anonimal
Copy link
Collaborator

anonimal commented Jul 30, 2016

By submitting this issue, I confirm the following:

  • I have read and understood the contributor guide.
  • I have checked that the issue I am reporting can be replicated or that the feature I am suggesting is not present.
  • I have checked opened or recently closed pull requests for existing solutions/implementations to my issue/suggestion.

Place an X inside the bracket to confirm

  • I confirm.

  1. To keep in order with our upstream guide, we should rename all files from .cpp to .cc and change from MixedCase.cpp to single_case_with_underscore.cc. Once that's done, remove the line about filename style in our style guide.
  2. Because our column limit for clang-format is 80, clang-format will squish the license in formatted files. To avoid this, we need to amend a // at the end of each line like so:
/**                                                                                       //
 * Copyright (c) 2015-2016, The Kovri I2P Router Project                                  //
 *                                                                                        //
 * All rights reserved.                                                                   //
 *                                                                                        //
 * Redistribution and use in source and binary forms, with or without modification, are   //
 * permitted provided that the following conditions are met:                              //
 *                                                                                        //
 * 1. Redistributions of source code must retain the above copyright notice, this list of //
 *    conditions and the following disclaimer.                                            //

or, amend clang-format on clang-format off before and after the license which I think is uglier and intrusive. I propose we stick with the less-intrusive version of //. If there is a better way to accomplish 2., I'm all ears.

Referencing #279 and #238.

@anonimal
Copy link
Collaborator Author

Unassigned myself. guzzi jones said he'd take the issue.

@EinMByte
Copy link
Contributor

EinMByte commented Aug 7, 2016

Let's stick with appending //.
Use of .cc is somewhat less common, but I'm fine with it. Lowercase/underscore has the advantage of avoiding compilation errors (as we've had) on case insensitive file systems, but is a bit less intuitive IMHO. That said, I don't really mind the change (these are not important matters anyway).

@anonimal
Copy link
Collaborator Author

anonimal commented Aug 7, 2016

Well, it all adds up (many smaller 'not important' matters turn into large important matter) so I'm glad this is being taken care of. 👍 on the case insensitivity solution; we can resolve that NetDb filename issue once this is resolved.

anonimal added a commit to anonimal/kovri that referenced this issue Aug 7, 2016
anonimal added a commit that referenced this issue Aug 9, 2016
ed52f05 Build: fix headers + cmake missed in 9c3dfba (anonimal)
9c3dfba snake_case (guzzi_jones)
c77510f Style: remove file guidelines from guide. Refs #280 (anonimal)
da2ac61 Tests: adjust CMake for .cpp -> .cc from 2ade4a8 (anonimal)
57c8e80 rename files with snake case (guzzi_jones)
e8f615d License: revert copyright errors introduced in 2ade4a8 (anonimal)
2ade4a8 Added instructions for Amazon EC2 instance adjusted license comment renamed all .cpp files remove mv.sh fixed CMakeLists.txt files with new .cc removed t.txt fixed comments.  appended // to original comments missed util files (guzzi_jones)
@anonimal
Copy link
Collaborator Author

anonimal commented Aug 9, 2016

Resolved with #299 and #302.

Thanks @guzzijones.

@anonimal
Copy link
Collaborator Author

anonimal commented Aug 9, 2016

@EinMByte JFTR: Boost (tested on 1.60) is still problematic with netdb.h and will fail to compile on Arch Linux x86_64 - even with include guard in place (see also /usr/include/netdb.h).

For now, we'll keep net_db.h to complement net_db_requests.h but I would like to see how this conflict can be resolved (or if it has been resolved).

anonimal added a commit that referenced this issue Aug 9, 2016
30d169d Style: move network_database -> net_db. Refs #280 (anonimal)
deba858 Build: update header guards. Fixes #303 (anonimal)
EinMByte added a commit to EinMByte/kovri that referenced this issue Aug 26, 2016
f936ffe Docs: remove EC2 build instructions (anonimal)
44daa5a Docs: consolidate + improve Quality Assurance guide (anonimal)
1462240 Docs: implement Quality Assurance guide. Refs monero-project#58 (anonimal)
719b7e8 Build: temporarily disable running tests after build (anonimal)
3a41c64 Docs: update Debian and Ubuntu build instructions (anonimal)
683a95a Docs: cleanup + update readme and building docs (anonimal)
9a8b88e Build: remove CXXFLAGS from Travis CI. Refs monero-project#316 (anonimal)
74f80fd Build: add CXXFLAGS for clang/cryptopp to Makefile (anonimal)
134791c Config: refactor command-line handler + update config file (anonimal)
79db048 Config: update and document kovri config file (anonimal)
f97cb1f Config/Daemon: clarify service option + refactor/remove deprecations (anonimal)
c7e54e6 Config: consolidate options + groupings. Refs monero-project#214 (anonimal)
87febb7 Log: remove deprecations marked TODO. Refs monero-project#214 (anonimal)
85415fe Log: implement options log-to-console/log-to-file + improve file logging (anonimal)
3ab8c07 Log: implement file logging. References monero-project#214 (anonimal)
f77fa78 Log: remove unneeded null_deleter check + redundant headers (anonimal)
48872a2 Build: add tests-optimized-hardening Makefile target (anonimal)
9542007 Build: update Makefile and build docs. Fixes monero-project#310 (anonimal)
703a268 Build: update OSX dependencies for Travis CI (anonimal)
263f881 Build: fix missed header guards + guard comments for monero-project#303 (anonimal)
1bb160c Build: add removal of doxygen output to make clean (anonimal)
418fa08 Configure OS X build on Travis-CI (rakhimov)
5a1de2c Reseed: add new server reseed.atomike.ninja (anonimal)
2d699b9 Doxygen: remove input filter + fix input & CMake (anonimal)
04a062a Style: rename common files to common idiom names (anonimal)
30d169d Style: move network_database -> net_db. Refs monero-project#280 (anonimal)
deba858 Build: update header guards. Fixes monero-project#303 (anonimal)
41f2237 Build: fix filename that broke tests build (anonimal)
ed52f05 Build: fix headers + cmake missed in 9c3dfba (anonimal)
ea3c1ea Initialize several unitialized members (monero-project#263). (EinMByte)
9c3dfba snake_case (guzzi_jones)
c77510f Style: remove file guidelines from guide. Refs monero-project#280 (anonimal)
da2ac61 Tests: adjust CMake for .cpp -> .cc from 2ade4a8 (anonimal)
57c8e80 rename files with snake case (guzzi_jones)
455349c Build: reinstate FreeBSD build. Resolves monero-project#176 (anonimal)
5f5b4a6 AddressBook: add custom hosts.txt file to package (anonimal)
388bf40 HTTP: implement SNI + update reseed. Fixes monero-project#129 (anonimal)
95c1ad5 Build: add CMake Boost min req + s/SEND_/FATAL_/g (anonimal)
2b8af8e Build: add compiler version requirements to CMake (anonimal)
9530329 Docs: trivial cleanup of style guide (anonimal)
90c9ed8 Docs: update minimum requirements + instructions (anonimal)
b50d936 Update dead link. (Patrick Alexander)
5286d91 Configure clang with gcc 4.9 on Travis-CI (rakhimov)
3e0577a Build: add windows msys2/mingw-w64 to build docs (anonimal)
611aa8c Build: fix compilation on mingw-w64. Refs monero-project#36 (anonimal)
749a04e mingw doesn't like c_str here (luigi1111)
9cb9b6e Build: update cryptopp submodule. Refs monero-project#36 (anonimal)
f075dea Build: remove clang from Travis CI. Refs monero-project#277 monero-project#278 (anonimal)
d0a5462 Build: fix clang build on Travis CI. Fixes monero-project#277 (anonimal)
7b5578d Docs: clarify Trusty 14.04 build instructions (anonimal)
fecabd2 Build: add boost status message in cmake (anonimal)
e3bd1f6 Build: uppercase Kovri resource dir for OSX/Win (anonimal)
f95a8ea Build: reduce build time + Makefile cleanup/fix (anonimal)
caa8ac2 Build: remove after_success from Travis CI (anonimal)
c8ead36 Build: run tests after successful make tests build (anonimal)
e8f615d License: revert copyright errors introduced in 2ade4a8 (anonimal)
2ade4a8 Added instructions for Amazon EC2 instance adjusted license comment renamed all .cpp files remove mv.sh fixed CMakeLists.txt files with new .cc removed t.txt fixed comments.  appended // to original comments missed util files (guzzi_jones)
7551d23 Docs: update .clang-format + update style guide (anonimal)
44e64e8 Travis-CI: comment clang build for reasons in monero-project#227 (anonimal)
cd4bd6a Docs: remove redundant export line for OSX (anonimal)
3d1ff55 Build: update clang/cryptopp instructions + Travis (anonimal)
08b51dc Travis-CI: fix clang version typo + gcc version (anonimal)
287ba83 Build: attempt multi-compiler in Travis CI (anonimal)
e8b1a3a Docs: bring back clang support in building doc (anonimal)
cc7aa70 Makefile: add flags for cryptopp clang support (anonimal)
90a90aa CMake: replace -std=c++14 with -std=c++1y for clang (anonimal)
41f7e40 Crypto: remove compression patch for cryptopp (anonimal)
562f9af Build: remove cryptopp dependency in travis and docs (anonimal)
ff23ded Build: fix cmake cryptopp link failure for 2.8.12 (anonimal)
ad73ea2 Build: cleanup cryptopp recipe in cmake (anonimal)
87e02b8 Build: fix wrong path in cmake for cryptopp libs (anonimal)
609a4a3 Build: implement cryptopp submodule. Fixes monero-project#210 (anonimal)
8167d44 Docs: add acknowledgements, move to doc directory (anonimal)
d696b33 Docs: clarify pull-request in contributing guide (anonimal)
5f11427 Docs: update pull-request template (anonimal)
814d8c9 Docs: update to reflect drop of branch development (anonimal)
4900040 Travis CI: remove on_success/on_failure (anonimal)
7ca81e9 Config: add reseed to cli help options. (anonimal)
fc4a796 Travis-CI: add full path for tests/benchmarks (anonimal)
d7d96f9 Travis-CI: move tests/benchmarks to script: (anonimal)
b6f38df Build: run tests and benchmarks on Travis CI (anonimal)
15f05e7 Build: update/cleanup Travis CI (anonimal)
691075f Makefile: add disable-options / add missing PHONY (anonimal)
88177fa Build: add/refactor targets in Makefile (anonimal)
038547b Build: fix shell warning in Makefile + refactor. (anonimal)
a07ec90 HTTP: rewrite URI parser. Fixes monero-project#257 (anonimal)
e33a368 Build: add commented YAML for travis-ci/travis-ci#5427 (anonimal)
f7c6786 Build: remove Coverity from Travis-CI. Closes monero-project#209 (anonimal)
ed9c8a8 Build: experiment with cov-configure in Travis-CI (anonimal)
dfccdc0 Docs: first-draft update of FAQ. Resolves monero-project#255. (anonimal)
7aa893e Docs: update boost 1.58 min req + add instructions (anonimal)
8d8d811 Build: add libboost-test1.58* to travis-ci. Refs monero-project#254. (anonimal)
d1130b3 Build: add -y to add-apt-repository in travis-ci. (anonimal)
8a7341f Build: fix typo in before_install in travis-ci. (anonimal)
8427401 Build: add boost 1.58 to travis-ci. Refs monero-project#254. (anonimal)
b916307 Build: add PHONY 'dependencies' to Makefile. (anonimal)
0d82989 Build: implement cpp-netlib (submodule/cmake/make/docs) (anonimal)
98a852b Build: add make install-resources to Travis-CI. (anonimal)
a96ac2b Docs: update build instructions for make install-resources (anonimal)
37c1cfd Build: fix Windows APPDATA path in Makefile. Refs monero-project#45. (anonimal)
8ea8276 Build: implement make install-resources. Fixes monero-project#45. (anonimal)
e70bd97 Build: fix shell'ism issue with travis. Refs monero-project#250. (anonimal)
db40f73 Build: fix travis error from timeout. Refs monero-project#249. (anonimal)
d531a5d Docs: add Clang to build instructions. Refs monero-project#242. (anonimal)
b3745b7 Build: allow passing CC/CXX from Makefile to CMake. (anonimal)
ba0385a Build: simplify build process. Resolves monero-project#242. (anonimal)
6675ec8 Docs: add contact info to README. Refs monero-project#241. (anonimal)
993a966 Docs: update and clarify style guide. Refs monero-project#245. (anonimal)
43621de Style: Clarify deviations from the GCSG (rakhimov)
b6c4d76 Fix StringStream::Seekg signature (rakhimov)
0527b14 Coverity: Remove unnecessary certificate fetch (rakhimov)
8230e46 Fix compilation with Clang 3.8 (rakhimov)
b219398 Add ClangFormat config for Google C++ Style (rakhimov)
527826e Docs: cleanup quickstart in README.md (anonimal)
bb6dfd7 Docs: add license status-badge to README.md (anonimal)
99e3bb9 Docs: add branch instructions to pull-request template. (anonimal)
31da8f0 Docs: update pull-request template's license caveat. (anonimal)
91a8ecc Docs: change links to cpplint project (rakhimov)
34c45cc Docs: fix trivial numbering in contributing guide. (anonimal)
eea4075 Crypto: use constant-time comparison in ed25519. (anonimal)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants