Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,29 @@
Language: Cpp
ColumnLimit: 110
IndentPPDirectives: BeforeHash
AlwaysBreakTemplateDeclarations : true
PackConstructorInitializers : CurrentLine
AlwaysBreakTemplateDeclarations: Yes
BreakAfterAttributes: Always
PackConstructorInitializers: CurrentLine
AccessModifierOffset: -1
IndentCaseLabels : true
IndentCaseLabels: true
AllowShortLambdasOnASingleLine: Empty
RequiresExpressionIndentation: OuterScope
BinPackArguments : false
BinPackParameters : false
LambdaBodyIndentation : Signature
PenaltyReturnTypeOnItsOwnLine : 1
BinPackArguments: false
LambdaBodyIndentation: Signature
PenaltyReturnTypeOnItsOwnLine: 1

Macros:
- LF_TRY=if
- LF_CATCH_ALL=else
- LF_HOF(x)={x;}
- LF_HOF(x,y)={x,y;}
- LF_HOF(x,y,z)={x,y,z;}
- LF_HOF(x,y,z,w)={x,y,z,w;}
- LF_HOF(a,b,c,d,e)={a;}
- LF_HOF(a,b,c,d,e,f)={a,b,c,d,e,f;}

SpaceBeforeParens: Custom
SpaceBeforeParensOptions:
AfterRequiresInClause: true
AfterRequiresInExpression : true
AfterRequiresInClause: true
AfterRequiresInExpression: true
...
284 changes: 143 additions & 141 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -10,148 +10,150 @@ Checks: "*,\
-llvm-header-guard,\
-llvm-include-order,\
-llvmlibc-*,\
-modernize-use-nodiscard,\
-readability-identifier-length,\
-misc-non-private-member-variables-in-classes"
WarningsAsErrors: ''
WarningsAsErrors: ""
CheckOptions:
- key: readability-function-cognitive-complexity.IgnoreMacros
value: 'true'
- key: 'bugprone-argument-comment.StrictMode'
value: 'true'
# Prefer using enum classes with 2 values for parameters instead of bools
- key: 'bugprone-argument-comment.CommentBoolLiterals'
value: 'true'
- key: 'bugprone-misplaced-widening-cast.CheckImplicitCasts'
value: 'true'
- key: 'bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression'
value: 'true'
- key: 'bugprone-suspicious-string-compare.WarnOnLogicalNotComparison'
value: 'true'
- key: 'readability-simplify-boolean-expr.ChainedConditionalReturn'
value: 'true'
- key: 'readability-simplify-boolean-expr.ChainedConditionalAssignment'
value: 'true'
- key: 'readability-uniqueptr-delete-release.PreferResetCall'
value: 'true'
- key: 'cppcoreguidelines-init-variables.MathHeader'
value: '<cmath>'
- key: 'cppcoreguidelines-narrowing-conversions.PedanticMode'
value: 'true'
- key: 'readability-else-after-return.WarnOnUnfixable'
value: 'true'
- key: 'readability-else-after-return.WarnOnConditionVariables'
value: 'true'
- key: 'readability-inconsistent-declaration-parameter-name.Strict'
value: 'true'
- key: 'readability-qualified-auto.AddConstToQualified'
value: 'true'
- key: 'readability-redundant-access-specifiers.CheckFirstDeclaration'
value: 'true'
# These seem to be the most common identifier styles
- key: 'readability-identifier-naming.AbstractClassCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ClassCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ClassConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ClassMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ClassMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstantMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstantParameterCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstantPointerParameterCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstexprFunctionCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstexprMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstexprVariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.EnumCase'
value: 'lower_case'
- key: 'readability-identifier-naming.EnumConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.FunctionCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalConstantPointerCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalFunctionCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalPointerCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalVariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.InlineNamespaceCase'
value: 'lower_case'
- key: 'readability-identifier-naming.LocalConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.LocalConstantPointerCase'
value: 'lower_case'
- key: 'readability-identifier-naming.LocalPointerCase'
value: 'lower_case'
- key: 'readability-identifier-naming.LocalVariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.MacroDefinitionCase'
value: 'UPPER_CASE'
- key: 'readability-identifier-naming.MemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.MethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.NamespaceCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ParameterCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ParameterPackCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PointerParameterCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PrivateMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PrivateMemberPrefix'
value: 'm_'
- key: 'readability-identifier-naming.PrivateMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ProtectedMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ProtectedMemberPrefix'
value: 'm_'
- key: 'readability-identifier-naming.ProtectedMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PublicMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PublicMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ScopedEnumConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.StaticConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.StaticVariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.StructCase'
value: 'lower_case'
- key: 'readability-identifier-naming.TemplateParameterCase'
value: 'CamelCase'
- key: 'readability-identifier-naming.TemplateTemplateParameterCase'
value: 'CamelCase'
- key: 'readability-identifier-naming.TypeAliasCase'
value: 'lower_case'
- key: 'readability-identifier-naming.TypedefCase'
value: 'lower_case'
- key: 'readability-identifier-naming.TypeTemplateParameterCase'
value: 'CamelCase'
- key: 'readability-identifier-naming.UnionCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ValueTemplateParameterCase'
value: 'CamelCase'
- key: 'readability-identifier-naming.VariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.VirtualMethodCase'
value: 'lower_case'
value: "true"
- key: "cppcoreguidelines-avoid-do-while.IgnoreMacros"
value: "true"
- key: "bugprone-argument-comment.StrictMode"
value: "true"
# Prefer using enum classes with 2 values for parameters instead of bools
- key: "bugprone-argument-comment.CommentBoolLiterals"
value: "true"
- key: "bugprone-misplaced-widening-cast.CheckImplicitCasts"
value: "true"
- key: "bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression"
value: "true"
- key: "bugprone-suspicious-string-compare.WarnOnLogicalNotComparison"
value: "true"
- key: "readability-simplify-boolean-expr.ChainedConditionalReturn"
value: "true"
- key: "readability-simplify-boolean-expr.ChainedConditionalAssignment"
value: "true"
- key: "readability-uniqueptr-delete-release.PreferResetCall"
value: "true"
- key: "cppcoreguidelines-init-variables.MathHeader"
value: "<cmath>"
- key: "cppcoreguidelines-narrowing-conversions.PedanticMode"
value: "true"
- key: "readability-else-after-return.WarnOnUnfixable"
value: "true"
- key: "readability-else-after-return.WarnOnConditionVariables"
value: "true"
- key: "readability-inconsistent-declaration-parameter-name.Strict"
value: "true"
- key: "readability-qualified-auto.AddConstToQualified"
value: "true"
- key: "readability-redundant-access-specifiers.CheckFirstDeclaration"
value: "true"
# These seem to be the most common identifier styles
- key: "readability-identifier-naming.AbstractClassCase"
value: "lower_case"
- key: "readability-identifier-naming.ClassCase"
value: "lower_case"
- key: "readability-identifier-naming.ClassConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.ClassMemberCase"
value: "lower_case"
- key: "readability-identifier-naming.ClassMethodCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstantMemberCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstantParameterCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstantPointerParameterCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstexprFunctionCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstexprMethodCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstexprVariableCase"
value: "lower_case"
- key: "readability-identifier-naming.EnumCase"
value: "lower_case"
- key: "readability-identifier-naming.EnumConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.FunctionCase"
value: "lower_case"
- key: "readability-identifier-naming.GlobalConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.GlobalConstantPointerCase"
value: "lower_case"
- key: "readability-identifier-naming.GlobalFunctionCase"
value: "lower_case"
- key: "readability-identifier-naming.GlobalPointerCase"
value: "lower_case"
- key: "readability-identifier-naming.GlobalVariableCase"
value: "lower_case"
- key: "readability-identifier-naming.InlineNamespaceCase"
value: "lower_case"
- key: "readability-identifier-naming.LocalConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.LocalConstantPointerCase"
value: "lower_case"
- key: "readability-identifier-naming.LocalPointerCase"
value: "lower_case"
- key: "readability-identifier-naming.LocalVariableCase"
value: "lower_case"
- key: "readability-identifier-naming.MacroDefinitionCase"
value: "UPPER_CASE"
- key: "readability-identifier-naming.MemberCase"
value: "lower_case"
- key: "readability-identifier-naming.MethodCase"
value: "lower_case"
- key: "readability-identifier-naming.NamespaceCase"
value: "lower_case"
- key: "readability-identifier-naming.ParameterCase"
value: "lower_case"
- key: "readability-identifier-naming.ParameterPackCase"
value: "lower_case"
- key: "readability-identifier-naming.PointerParameterCase"
value: "lower_case"
- key: "readability-identifier-naming.PrivateMemberCase"
value: "lower_case"
- key: "readability-identifier-naming.PrivateMemberPrefix"
value: "m_"
- key: "readability-identifier-naming.PrivateMethodCase"
value: "lower_case"
- key: "readability-identifier-naming.ProtectedMemberCase"
value: "lower_case"
- key: "readability-identifier-naming.ProtectedMemberPrefix"
value: "m_"
- key: "readability-identifier-naming.ProtectedMethodCase"
value: "lower_case"
- key: "readability-identifier-naming.PublicMemberCase"
value: "lower_case"
- key: "readability-identifier-naming.PublicMethodCase"
value: "lower_case"
- key: "readability-identifier-naming.ScopedEnumConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.StaticConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.StaticVariableCase"
value: "lower_case"
- key: "readability-identifier-naming.StructCase"
value: "lower_case"
- key: "readability-identifier-naming.TemplateParameterCase"
value: "CamelCase"
- key: "readability-identifier-naming.TemplateTemplateParameterCase"
value: "CamelCase"
- key: "readability-identifier-naming.TypeAliasCase"
value: "lower_case"
- key: "readability-identifier-naming.TypedefCase"
value: "lower_case"
- key: "readability-identifier-naming.TypeTemplateParameterCase"
value: "CamelCase"
- key: "readability-identifier-naming.UnionCase"
value: "lower_case"
- key: "readability-identifier-naming.ValueTemplateParameterCase"
value: "CamelCase"
- key: "readability-identifier-naming.VariableCase"
value: "lower_case"
- key: "readability-identifier-naming.VirtualMethodCase"
value: "lower_case"
...
2 changes: 1 addition & 1 deletion .clangd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CompileFlags:
CompilationDatabase: build/dev
CompilationDatabase: build/dev
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ builtin = clear,rare,en-GB_to_en-US,names,informal,code
check-filenames =
check-hidden =
ignore-words-list = deque,warmup,stdio,copyable,combinate
skip = */.git,*/build,*/prefix,*/vcpkg,*/_build,*/bench
skip = */.git,*/build,*/.legacy
quiet-level = 2
8 changes: 8 additions & 0 deletions .gemini/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"context": {
"fileName": "AGENTS.md"
},
"ui": {
"hideBanner": true
}
}
34 changes: 34 additions & 0 deletions .github/workflows/linear.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Linear History

on:
pull_request:
branches: ["modules"]
workflow_dispatch:

jobs:
check-linear-history:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0

- name: Check for merge commits
run: |
BASE_REF=${{ github.base_ref || 'modules' }}
echo "Comparing against base: $BASE_REF"
git fetch origin $BASE_REF:$BASE_REF
MERGE_COMMITS=$(git rev-list --merges $BASE_REF..HEAD)
if [ -n "$MERGE_COMMITS" ]; then
echo "Error: Merge commits detected. libfork requires a linear history."
echo "Please rebase your branch onto $BASE_REF to remove merge commits."
echo ""
echo "Merge commits found:"
git log --merges --oneline $BASE_REF..HEAD
exit 1
else
echo "No merge commits detected. Linear history check passed."
fi

Loading
Loading