Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #20

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions .ci/azure-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ steps:
- task: CMake@1
inputs:
cmakeArgs: .. -DCMAKE_CXX_STANDARD=$(utilities.std) -DCMAKE_BUILD_TYPE=$(utilities.build_type) $(utilities.options)
displayName: 'Configure'
displayName: "Configure"
env:
GIT_SSL_NO_VERIFY: 1

- script: cmake --build .
displayName: 'Build'
displayName: "Build"
workingDirectory: build
4 changes: 2 additions & 2 deletions .ci/azure-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ steps:

- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'cmake*.tar.gz'
destinationFolder: 'cmake_program'
archiveFilePatterns: "cmake*.tar.gz"
destinationFolder: "cmake_program"
displayName: Extract CMake

- bash: echo "##vso[task.prependpath]$(Build.SourcesDirectory)/cmake_program/cmake-3.14.3-Linux-x86_64/bin"
Expand Down
6 changes: 3 additions & 3 deletions .ci/azure-test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
steps:
- script: ctest --output-on-failure -C $(utilities.build_type) -T test
displayName: 'Test'
displayName: "Test"
workingDirectory: build

- task: PublishTestResults@2
inputs:
testResultsFormat: 'cTest'
testResultsFiles: '**/Test.xml'
testResultsFormat: "cTest"
testResultsFiles: "**/Test.xml"
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- image: helics/buildenv:sanitizers-14
environment:
CMAKE_FLAGS: '-DCMAKE_CXX_FLAGS="-fsanitize=thread -g -O1 " '
TSAN_OPTIONS: 'second_deadlock_stack=1 suppressions=/root/project/.circleci/tsan_suppression.txt history_size=4'
TSAN_OPTIONS: "second_deadlock_stack=1 suppressions=/root/project/.circleci/tsan_suppression.txt history_size=4"

steps:
- checkout
Expand All @@ -27,9 +27,9 @@ jobs:
- image: helics/buildenv:sanitizers-14
environment:
CMAKE_FLAGS: '-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-fsanitize=undefined,address -lc++ -lc++abi -fsanitize-address-use-after-scope -Wno-unused-command-line-argument -fno-omit-frame-pointer -g -O1 -fsanitize-blacklist=/root/project/.circleci/asan_blacklist.txt" '
LSAN_OPTIONS: 'suppressions=/root/project/.circleci/leak_suppression.txt'
UBSAN_OPTIONS: 'print_stacktrace=1'
ASAN_OPTIONS: 'alloc_dealloc_mismatch=0'
LSAN_OPTIONS: "suppressions=/root/project/.circleci/leak_suppression.txt"
UBSAN_OPTIONS: "print_stacktrace=1"
ASAN_OPTIONS: "alloc_dealloc_mismatch=0"

steps:
- checkout
Expand Down
14 changes: 7 additions & 7 deletions .github/actions/cmake_config/action.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
description: 'Test out a bare bones configuration with a CMake version'
description: "Test out a bare bones configuration with a CMake version"
inputs:
version:
description: 'The full version of CMake to check'
description: "The full version of CMake to check"
required: true
options:
description: 'The CMake configuration options'
description: "The CMake configuration options"
required: false
default: ''
name: 'Configure with CMake'
default: ""
name: "Configure with CMake"
runs:
using: 'docker'
image: 'Dockerfile'
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.version }}
- ${{ inputs.options }}
12 changes: 6 additions & 6 deletions .github/actions/create-file-update-pr/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: 'Create File Update PR'
description: 'Pushes a new branch with changed files and opens a PR for updating the changed files in the base branch'
name: "Create File Update PR"
description: "Pushes a new branch with changed files and opens a PR for updating the changed files in the base branch"
inputs:
no-hash: # turn off inclusion of the hash in the created branch name
description: 'Do not include the changed file hash in the PR branch name'
description: "Do not include the changed file hash in the PR branch name"
default: false
replace-branch: # if a PR branch already exists, replaces it with updated contents
description: 'Replace the contents of an existing PR branch of the same name'
description: "Replace the contents of an existing PR branch of the same name"
default: false
runs:
using: 'docker'
image: 'Dockerfile'
using: "docker"
image: "Dockerfile"
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ repos:
- id: cmake-format
exclude: "cmake+"
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
rev: v4.0.0-alpha.8
hooks:
- id: prettier
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1
rev: v1.5.5
hooks:
- id: remove-tabs
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.3.0
hooks:
- id: codespell
exclude: ^(test/|config/)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: mixed-line-ending
- id: trailing-whitespace
Expand All @@ -36,7 +36,7 @@ repos:
- id: end-of-file-fixer
- id: check-shebang-scripts-are-executable
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
rev: v19.1.1
hooks:
- id: clang-format
types:
Expand Down
24 changes: 8 additions & 16 deletions gmlc/utilities/timeRepresentation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,34 +435,29 @@ class TimeRepresentation {
#ifdef _DEBUG
constexpr explicit TimeRepresentation(
std::integral_constant<int, 0> /*unused*/) noexcept :
internalTimeCode(Tconv::zeroVal()),
doubleTimeValue(0.0)
internalTimeCode(Tconv::zeroVal()), doubleTimeValue(0.0)
{
}
constexpr explicit TimeRepresentation(
std::integral_constant<int, -1> /*unused*/) noexcept :
internalTimeCode(Tconv::minVal()),
doubleTimeValue(-1.456e47)
internalTimeCode(Tconv::minVal()), doubleTimeValue(-1.456e47)
{
}
constexpr explicit TimeRepresentation(
std::integral_constant<int, 1> /*unused*/) noexcept :
internalTimeCode(Tconv::maxVal()),
doubleTimeValue(1e49)
internalTimeCode(Tconv::maxVal()), doubleTimeValue(1e49)
{
}
constexpr explicit TimeRepresentation(
std::integral_constant<int, 2> /*unused*/) noexcept :
internalTimeCode(Tconv::epsilon()),
doubleTimeValue(1e-9)
internalTimeCode(Tconv::epsilon()), doubleTimeValue(1e-9)
{
}
constexpr TimeRepresentation(
std::integral_constant<int, 4> /*unused*/,
baseType initBaseVal,
double initDoubleTime) noexcept :
internalTimeCode(initBaseVal),
doubleTimeValue(initDoubleTime)
internalTimeCode(initBaseVal), doubleTimeValue(initDoubleTime)
{
}
#else
Expand All @@ -488,8 +483,7 @@ class TimeRepresentation {
}
constexpr TimeRepresentation(
std::integral_constant<int, 4> /*unused*/,
baseType initBaseVal) noexcept :
internalTimeCode(initBaseVal)
baseType initBaseVal) noexcept : internalTimeCode(initBaseVal)
{
}
#endif
Expand Down Expand Up @@ -519,13 +513,11 @@ class TimeRepresentation {
} // NOLINT
constexpr TimeRepresentation(
std::chrono::nanoseconds nsTime) noexcept // NOLINT
:
internalTimeCode(Tconv::convert(nsTime))
: internalTimeCode(Tconv::convert(nsTime))
{
}
constexpr TimeRepresentation(std::int64_t count, time_units units) noexcept
:
internalTimeCode(Tconv::fromCount(count, units))
: internalTimeCode(Tconv::fromCount(count, units))
{
}
#endif
Expand Down