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
180 changes: 90 additions & 90 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
---
Language: Cpp
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AcrossComments: false
AlignCompound: false
AlignFunctionDeclarations: false
AlignFunctionPointers: false
PadOperators: true
PadOperators: true
AlignConsecutiveBitFields:
Enabled: false
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AcrossComments: false
AlignCompound: false
AlignFunctionDeclarations: false
AlignFunctionPointers: false
PadOperators: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AcrossComments: false
AlignCompound: false
AlignFunctionDeclarations: true
AlignFunctionPointers: false
PadOperators: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: false
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AcrossComments: false
AlignCompound: false
AlignFunctionDeclarations: false
AlignFunctionPointers: false
PadOperators: false
PadOperators: false
AlignConsecutiveShortCaseStatements:
Enabled: false
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AcrossComments: false
AlignCaseArrows: false
AlignCaseColons: false
AlignConsecutiveTableGenBreakingDAGArgColons:
Enabled: false
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AcrossComments: false
AlignCompound: false
AlignFunctionDeclarations: false
AlignFunctionPointers: false
PadOperators: false
PadOperators: false
AlignConsecutiveTableGenCondOperatorColons:
Enabled: false
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AcrossComments: false
AlignCompound: false
AlignFunctionDeclarations: false
AlignFunctionPointers: false
PadOperators: false
PadOperators: false
AlignConsecutiveTableGenDefinitionColons:
Enabled: false
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AcrossComments: false
AlignCompound: false
AlignFunctionDeclarations: false
AlignFunctionPointers: false
PadOperators: false
PadOperators: false
AlignEscapedNewlines: Right
AlignOperands: Align
AlignOperands: Align
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowBreakBeforeNoexceptSpecifier: Never
Expand All @@ -89,29 +89,29 @@ BinPackArguments: false
BinPackParameters: false
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterEnum: false
AfterExternBlock: false
AfterFunction: true
AfterNamespace: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakAdjacentStringLiterals: true
BreakAfterAttributes: Leave
BreakAfterJavaFieldAnnotations: false
BreakAfterReturnType: None
BreakArrays: true
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Custom
Expand All @@ -123,14 +123,14 @@ BreakFunctionDefinitionParameters: false
BreakInheritanceList: AfterColon
BreakStringLiterals: true
BreakTemplateDeclarations: Yes
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
ColumnLimit: 100
CommentPragmas: "^ IWYU pragma:"
CompactNamespaces: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
Expand All @@ -141,22 +141,22 @@ ForEachMacros:
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: ".*"
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: "(Test)?$"
IncludeIsMainSourceRegex: ""
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: false
Expand All @@ -165,29 +165,29 @@ IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequiresClause: true
IndentWidth: 2
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertBraces: false
InsertBraces: false
InsertNewlineAtEOF: false
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
Binary: 0
BinaryMinDigits: 0
Decimal: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLines:
AtEndOfFile: false
AtStartOfBlock: true
AtStartOfFile: false
KeepFormFeed: false
AtEndOfFile: false
AtStartOfBlock: true
AtStartOfFile: false
KeepFormFeed: false
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
LineEnding: DeriveLF
MacroBlockBegin: ""
MacroBlockEnd: ""
MainIncludeChar: Quote
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
Expand All @@ -210,10 +210,10 @@ PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
PPIndentWidth: -1
PPIndentWidth: -1
QualifierAlignment: Right
ReferenceAlignment: Pointer
ReflowComments: false
ReflowComments: false
RemoveBracesLLVM: false
RemoveEmptyLinesInUnwrappedLines: false
RemoveParentheses: Leave
Expand All @@ -223,7 +223,7 @@ RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SkipMacroDefinitionBody: false
SortIncludes: CaseSensitive
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: LexicographicNumeric
SpaceAfterCStyleCast: false
Expand All @@ -242,7 +242,7 @@ SpaceBeforeParensOptions:
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterIfMacros: true
AfterOverloadedOperator: false
AfterPlacementOperator: true
AfterRequiresInClause: false
Expand All @@ -252,28 +252,28 @@ SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInAngles: Never
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParens: Never
Minimum: 1
Maximum: -1
SpacesInParens: Never
SpacesInParensOptions:
ExceptDoubleParentheses: false
InCStyleCasts: false
InCStyleCasts: false
InConditionalStatements: false
InEmptyParentheses: false
Other: false
Other: false
SpacesInSquareBrackets: false
Standard: Latest
Standard: Latest
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TableGenBreakInsideDAGArg: DontBreak
TabWidth: 8
UseTab: Never
TabWidth: 8
UseTab: Never
VerilogBreakBetweenInstancePorts: true
WhitespaceSensitiveMacros:
- BOOST_PP_STRINGIZE
Expand Down
13 changes: 13 additions & 0 deletions .gersemirc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# gersemi is an opinionated formatter and does not support the same
# level of configuration as cmake-format. The previous settings from
# .cmake-format.json (dangle_align and dangle_parens) are not
# supported and have no direct equivalents.

definitions: []
disable_formatting: false
extensions: []
indent: 2
line_length: 99
list_expansion: favour-inlining
unsafe: false
warn_about_unknown_commands: false
2 changes: 2 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MD013:
code_blocks: false
Comment on lines +1 to +2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- .markdownlint.yaml ---\n'
cat -n .markdownlint.yaml

printf '\n--- markdownlint references ---\n'
rg -n --hidden --glob '!node_modules' --glob '!dist' --glob '!build' --glob '!coverage' 'markdownlint|markdownlint-cli|MD013|ignore_code_blocks|code_blocks' .

Repository: Framework-R-D/phlex-examples

Length of output: 257


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- .markdownlint.yaml ---'
cat -n .markdownlint.yaml

echo
echo '--- markdownlint references ---'
rg -n --hidden --glob '!node_modules' --glob '!dist' --glob '!build' --glob '!coverage' 'markdownlint|markdownlint-cli|MD013|ignore_code_blocks|code_blocks' .

echo
echo '--- dependency manifests mentioning markdownlint ---'
git ls-files | rg '(^|/)(package\.json|package-lock\.json|pnpm-lock\.yaml|yarn\.lock|bun\.lockb|requirements\.txt|poetry\.lock|Gemfile.lock|go\.mod|Cargo\.toml)$' | while read -r f; do
  if rg -n 'markdownlint' "$f" >/dev/null 2>&1; then
    echo "### $f"
    rg -n 'markdownlint' "$f"
  fi
done

Repository: Framework-R-D/phlex-examples

Length of output: 542


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- .pre-commit-config.yaml (markdownlint section) ---'
nl -ba .pre-commit-config.yaml | sed -n '48,72p'

Repository: Framework-R-D/phlex-examples

Length of output: 261


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- .pre-commit-config.yaml (markdownlint section) ---'
cat -n .pre-commit-config.yaml | sed -n '48,72p'

echo
echo '--- markdownlint-cli2 version refs in repo ---'
rg -n 'markdownlint-cli2|markdownlint' .pre-commit-config.yaml .github .gitlab-ci.yml .circleci . 2>/dev/null

Repository: Framework-R-D/phlex-examples

Length of output: 973


🌐 Web query:

markdownlint MD013 code_blocks deprecated ignore_code_blocks markdownlint-cli2 v0.22.1

💡 Result:

The parameter code_blocks for rule MD013 has been deprecated in favor of ignore_code_blocks [1][2][3]. To align with consistent naming conventions across markdownlint rules, ignore_code_blocks was introduced as a more descriptive alternative [4][5]. When using the deprecated code_blocks parameter (specifically if set to false), the tool will output a deprecation warning advising you to replace it with ignore_code_blocks: true [1][2][3]. If you are using markdownlint-cli2 v0.22.1, it inherits this behavior because it relies on the underlying markdownlint library where these changes were implemented [6][7]. To update your configuration, change your MD013 settings as follows: Deprecated: "MD013": { "code_blocks": false } Recommended: "MD013": { "ignore_code_blocks": true } [1][2][3]

Citations:


Use ignore_code_blocks for MD013

code_blocks is the deprecated form here; switch to the replacement to avoid noisy lint warnings going forward.

Suggested change
 MD013:
-  code_blocks: false
+  ignore_code_blocks: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
MD013:
code_blocks: false
MD013:
ignore_code_blocks: true
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.markdownlint.yaml around lines 1 - 2, Replace the deprecated MD013 option
`code_blocks` with its supported replacement `ignore_code_blocks` in the
markdownlint configuration.

60 changes: 60 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

# Everything in copied_from_larsoft_minor_edits is copied from larsoft and should not be modified.
# It is excluded from pre-commit checks to avoid unnecessary noise.
exclude: ^migration/gauss_hit_finder/copied_from_larsoft_minor_edits/

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: check-executables-have-shebangs
- id: mixed-line-ending
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.19
hooks:
- id: ruff-format
types_or: [python, pyi]
- id: ruff
types_or: [python, pyi]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.8
hooks:
- id: clang-format
types_or: [c++, c, cuda]
- repo: local
hooks:
- id: fix-header-guards
name: fix C++ header guards
entry: python3 scripts/fix_header_guards.py
language: system
files: \.(h|hpp)$
- repo: https://github.com/BlankSpruce/gersemi-pre-commit
rev: 0.27.7
hooks:
- id: gersemi
- repo: https://github.com/google/go-jsonnet
rev: v0.22.0
hooks:
- id: jsonnet-format
- id: jsonnet-lint
# The files in test/max-parallelism import files that are generated during the build.
# We therefore exclude them from linting, but still format them.
exclude: ^test/max-parallelism
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.8.4
hooks:
- id: prettier
types_or: [yaml]
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.22.1
hooks:
- id: markdownlint-cli2
args: [--fix]
Loading