Skip to content
Merged
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
72 changes: 72 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
Language: Cpp
BasedOnStyle: Microsoft

# Indentation
IndentWidth: 2 # 2 spaces per indent
AccessModifierOffset: -2
IndentAccessModifiers: false # Align access modifiers to braces
NamespaceIndentation: All # Indent namspace contents
ConstructorInitializerIndentWidth: 2

# Comments which match this regex will be unformatted (and therefore can be longer or have more whitespace than other comments)
CommentPragmas: '^\*\*'


# Alignment
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AlignCompound: true
PadOperators: true
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
# For future versions of clang-format
# AlignFunctionDeclarations: false
# AlignFunctionPointers: false
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true

# Newlines
ColumnLimit: 0
BreakBeforeBraces: Allman # Braces on their own lines
Comment thread
pelesh marked this conversation as resolved.
SeparateDefinitionBlocks: Always # Separate definitions (functions etc.) with an empty line
AlwaysBreakTemplateDeclarations: true # Put template on their own lines
AllowShortBlocksOnASingleLine: Never
# On a newer version of clang-format, replace with BinPackArguments: OnePerLine
BinPackArguments: false # Don't allow multiple function arguments on the same line unless they all fit
BinPackParameters: false # Same but for parameters
PackConstructorInitializers: NextLine
AllowShortFunctionsOnASingleLine: None
BreakBeforeBinaryOperators: NonAssignment # Put binary operators after a line break, rather than before
AllowShortIfStatementsOnASingleLine: Never

# Spaces
SpaceBeforeParens: ControlStatementsExceptControlMacros
SpaceAfterCStyleCast: true
PointerAlignment: Left

# Includes
IncludeBlocks: Regroup # Regroup includes based on config
IncludeCategories:
- Regex: '(^"|\.hpp)' # 'local' includes
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '\/' # Library includes
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '.*' # Everything else
Priority: 1
SortPriority: 0
CaseSensitive: false
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
},
"workspaceFolder": "/home/app/",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/app/,type=bind,consistency=cached"
}
}
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
blank_issues_enabled: true
blank_issues_enabled: true
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@

_If this is a relatively large or complex change, kick off the discussion by explaining
why you chose the solution you did and what alternatives you considered, etc._

9 changes: 0 additions & 9 deletions .github/workflows/.clang-format

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/pre_commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: resolve-bot pre-commit

# Won't run on develop/main directly
on: [pull_request]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-python@v5.4.0
- uses: pre-commit/action@v3.0.1
- uses: EndBug/add-and-commit@v9.1.4
# Only need to try and commit if the action failed
if: failure()
with:
fetch: false
committer_name: GitHub Actions
committer_email: actions@github.com
message: Apply pre-commmit fixes
2 changes: 1 addition & 1 deletion .gitlab/pnnl/incline.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ failure:
- .report-status
rules:
- when: on_failure


13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.7
hooks:
- id: clang-format
types_or: [c++, c, cuda]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: forbid-new-submodules
- id: end-of-file-fixer
- id: check-yaml
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#[[

@brief ReSolve library root
@brief Re::Solve library root

@author Slaven Peles <peless@ornl.gov>

Expand Down
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,3 @@ class Matrix // No, class is outside ReSolve namespace
{
// matrix code
};


1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,3 @@ contributions to ReSolve must be made under the smae licensing terms.
**Please Note** If you are using ReSolve with any third party libraries linked
in (e.g., KLU), be sure to review the respective license of the package as that
license may have more restrictive terms than the ReSolve license.

1 change: 0 additions & 1 deletion buildsystem/ascent-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
module load gcc/10.2
# Load spack deps
source ./buildsystem/spack/ascent/modules/dependencies.sh

1 change: 0 additions & 1 deletion buildsystem/incline-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ unset GPU_DEVICE_ORDINAL

# Load spack generated modules
source ./buildsystem/spack/incline/modules/dependencies.sh

1 change: 0 additions & 1 deletion buildsystem/init-mirror.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ res=$?
chmod -R ugo+wrx $SPACK_MIRROR &

exit $res

1 change: 0 additions & 1 deletion buildsystem/spack/ascent/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ export SPACK_PYTHON=$(which python)
export tempdir=$SPACK_CACHE
export TMP=$SPACK_CACHE
export TMPDIR=$SPACK_CACHE

1 change: 0 additions & 1 deletion buildsystem/spack/ascent/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,3 @@ spack:
modules: [gcc/10.2]
operating_system: rhel8
target: ppc64le

2 changes: 1 addition & 1 deletion buildsystem/spack/deception/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ spack:
fc: /share/apps/gcc/9.1.0/bin/gfortran
operating_system: centos7
target: x86_64
modules: [gcc/9.1.0]
modules: [gcc/9.1.0]
1 change: 0 additions & 1 deletion buildsystem/spack/incline/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ export SPACK_PYTHON=$(which python3)
export tempdir=$SPACK_CACHE
export TMP=$SPACK_CACHE
export TMPDIR=$SPACK_CACHE

1 change: 0 additions & 1 deletion cmake/ReSolveFindHipLibraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ target_include_directories(resolve_hip INTERFACE
$<BUILD_INTERFACE:${hip_includes}>)

install(TARGETS resolve_hip EXPORT ReSolveTargets)

2 changes: 1 addition & 1 deletion docs/doxygen/doxygen-awesome-interactive-toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ class DoxygenAwesomeInteractiveToc {
active?.classList.add("active")
active?.classList.remove("aboveActive")
}
}
}
2 changes: 1 addition & 1 deletion docs/doxygen/doxygen-awesome-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ class DoxygenAwesomeTabs {
})
})
}
}
}
1 change: 0 additions & 1 deletion docs/doxygen/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ API Documentation


Doxygen generated API documentation can be found here: `Doxygen Docs <html/index.html>`_

2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ docutils
sphinx==6.2.1
sphinx-rtd-theme==1.2.2
breathe
m2r2
m2r2
2 changes: 1 addition & 1 deletion docs/sphinx/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
License
*******

.. include:: ../../LICENSE
.. include:: ../../LICENSE
2 changes: 1 addition & 1 deletion docs/sphinx/style/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
/* Sidebar header (and topbar for mobile) */
.wy-side-nav-search, .wy-nav-top {
background: #343131;
}
}
Loading
Loading