Style guide #140

Closed
opened 2024-07-10 06:32:48 +00:00 by emma · 3 comments
Owner

The formatting of some tools in this repository is out-of-hand. @silt and I will be working on a STYLE file in the root of the tree.

The formatting of some tools in this repository is out-of-hand. @silt and I will be working on a STYLE file in the root of the tree.
emma added the
enhancement
label 2024-07-10 06:32:48 +00:00
emma self-assigned this 2024-07-10 06:32:48 +00:00
silt was assigned by emma 2024-07-10 06:32:48 +00:00
Owner

embedded into the styleguide will be a matching .clang-format for the convenience of any interested parties

embedded into the styleguide will be a matching `.clang-format` for the convenience of any interested parties
emma pinned this 2024-07-15 20:18:32 +00:00
Author
Owner

We should also embed a rustfmt.toml for Rust code.

We should also embed a `rustfmt.toml` for Rust code.
Owner

unless someone else is interested in writing it, the .clang-format isn't going to happen. as far as i can tell, it's far too buggy to be even remotely useful. maybe it's a skill issue on my part, no clue. for future reference, here's what i've got:

Language: Cpp  # docs say to use Cpp for C as well
PointerAlignment: Left
ColumnLimit: 80
IndentWidth: 4
ContinuationIndentWidth: 4
UseTab: Always
LineEnding: LF
InsertBraces: true
BreakBeforeBraces: Attach
BreakBeforeBinaryOperators: All
AllowShortFunctionsOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlignOperands: Align
AlignAfterOpenBracket: BlockIndent
AllowAllArgumentsOnNextLine: false
IndentCaseLabels: true
IndentCaseBlocks: true
IndentGotoLabels: true
SpaceBeforeCaseColon: false
SpaceBeforeParens: ControlStatements
SpacesBeforeTrailingComments: 2
SpaceBeforeAssignmentOperators: true
InsertNewlineAtEOF: true
unless someone else is interested in writing it, the `.clang-format` isn't going to happen. as far as i can tell, it's far too buggy to be even remotely useful. maybe it's a skill issue on my part, no clue. for future reference, here's what i've got: ```yaml Language: Cpp # docs say to use Cpp for C as well PointerAlignment: Left ColumnLimit: 80 IndentWidth: 4 ContinuationIndentWidth: 4 UseTab: Always LineEnding: LF InsertBraces: true BreakBeforeBraces: Attach BreakBeforeBinaryOperators: All AllowShortFunctionsOnASingleLine: Empty AllowShortCaseLabelsOnASingleLine: false AllowShortIfStatementsOnASingleLine: true AllowShortLoopsOnASingleLine: true AlignOperands: Align AlignAfterOpenBracket: BlockIndent AllowAllArgumentsOnNextLine: false IndentCaseLabels: true IndentCaseBlocks: true IndentGotoLabels: true SpaceBeforeCaseColon: false SpaceBeforeParens: ControlStatements SpacesBeforeTrailingComments: 2 SpaceBeforeAssignmentOperators: true InsertNewlineAtEOF: true ```
emma closed this issue 2024-07-30 04:59:57 +00:00
emma unpinned this 2024-07-30 05:00:00 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: bonsai/harakit#140
No description provided.