Comments (6)
Sounds good, only strong preferences I have are:
- 4 space indent
- opening on same line, close on new line, e.g.
if (something) {
do_something_here
}
Indent within namespaces I am fine with either indent or no indent
from carma.
Ok; understood 👍
from carma.
I suggest this configuration:
clang-format.txt
You can try it here https://zed0.co.uk/clang-format-configurator/ using upload feature.
from carma.
Only thing I don't like about the config is:
std::vector<uint32_t> returnVector( uint32_t* LongNameForParameter1,
double* LongNameForParameter2,
const float& LongNameForParameter3,
const std::map<std::string,int32_t>& LongNameForParameter4) {
Preferring:
std::vector<uint32_t> returnVector(
uint32_t* LongNameForParameter1,
double* LongNameForParameter2,
const float& LongNameForParameter3,
const std::map<std::string, int32_t>& LongNameForParameter4
) {
However this doesn't seem possible, the closest I got:
std::vector<uint32_t> returnVector(
uint32_t* LongNameForParameter1,
double* LongNameForParameter2,
const float& LongNameForParameter3,
const std::map<std::string, int32_t>& LongNameForParameter4) {
What are your thoughts?
config:
---
BasedOnStyle: Chromium
AllowShortBlocksOnASingleLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortIfStatementsOnASingleLine: 'false'
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakTemplateDeclarations: 'Yes'
BinPackArguments: 'false'
BinPackParameters: 'false'
BreakBeforeBinaryOperators: All
BreakInheritanceList: BeforeComma
ColumnLimit: '120'
CompactNamespaces: 'false'
FixNamespaceComments: 'true'
IndentWidth: 4
UseTab: Never
ObjCBlockIndentWidth: 4
ContinuationIndentWidth: 4
AlignAfterOpenBracket: AlwaysBreak
IndentCaseLabels: true
AllowAllParametersOfDeclarationOnNextLine: false
from carma.
Except ObjCBlockIndentWidth
which is for Objective-C code, I've updated clang-format following your config (cf #37).
(and I don't know how to do a style closer to your preferred style).
from carma.
Thanks for the work, closed by #37
from carma.
Related Issues (20)
- Undefined symbols during packaging HOT 4
- `cibuildwheel` manylinux build issue HOT 12
- `carma` changes install location based on installation status HOT 3
- Segmentation Fault on Carma Example code HOT 3
- Carma seem to not support fixed size matrices HOT 1
- LICENSE Question HOT 2
- Is there a way to use carma from source? HOT 5
- CARMA does not correctly borrow the array when used with pybind11 trampoline classes, resulting in referencing garbage collected memory HOT 7
- Citation(s)? HOT 1
- Definition of `ssize_t` in `headers\carma\include\carma(28)` causes CI issue on Windows HOT 4
- CMake Error _add_library cannot create target "armadillo" because an imported target with the same name already exists HOT 3
- Weird (?) behavior with arrays, especially with arrays created via `np.ones` HOT 8
- new release? HOT 3
- NumPy 2.0 support HOT 9
- Potentially mismatched allocator-deallocator when linking to external shared library HOT 3
- Exception handling broken when linking to carma for Windows+Clang HOT 10
- Crash when assigning one matrix to another HOT 2
- is `cmake v3.16` necessary? HOT 7
- Repo does not pass flake8 HOT 2
- Possible to call `arr_to_mat<float>`? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carma.