Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 11, 2023
1 parent 35bab54 commit 5223d96
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 106 deletions.
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=$(units.std) -DUNITS_HEADER_ONLY=$(units.header) -DCMAKE_BUILD_TYPE=$(units.build_type) $(units.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-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ steps:
- task: CMake@1
inputs:
cmakeArgs: .. -DCMAKE_BUILD_TYPE=Debug
displayName: 'Configure'
displayName: "Configure"

- script: cmake --build . -j
displayName: 'Build'
displayName: "Build"
workingDirectory: build

- script: ctest --output-on-failure -C Debug
displayName: 'Test'
displayName: "Test"
workingDirectory: build
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 $(units.build_type) -T test
displayName: 'Test'
displayName: "Test"
workingDirectory: build

- task: PublishTestResults@2
inputs:
testResultsFormat: 'cTest'
testResultsFiles: '**/Test.xml'
testResultsFormat: "cTest"
testResultsFiles: "**/Test.xml"
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- image: helics/buildenv:sanitizers-14
environment:
CMAKE_FLAGS: '-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-fsanitize=thread -nostdinc++ -nostdlib++ -L/root/develop/libcxx_tsan/lib -lc++ -lc++abi -I/root/develop/libcxx_tsan/include -I/root/develop/libcxx_tsan/include/c++/v1 -Wno-unused-command-line-argument -fno-omit-frame-pointer -g -O2 -Wl,-rpath,/root/develop/libcxx_tsan/lib" '
TSAN_OPTIONS: 'second_deadlock_stack=1'
TSAN_OPTIONS: "second_deadlock_stack=1"

steps:
- checkout
Expand All @@ -53,9 +53,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 All @@ -77,7 +77,7 @@ jobs:

environment:
CMAKE_FLAGS: '-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_COMPILER_FORCED=ON -DCMAKE_CXX_FLAGS="-g -O1 -fsanitize=fuzzer,undefined,address" '
UBSAN_OPTIONS: 'print_stacktrace=1'
UBSAN_OPTIONS: "print_stacktrace=1"
steps:
- checkout
- run: *run_fuzz
Expand All @@ -90,7 +90,7 @@ jobs:
docker:
- image: helics/buildenv:builder
environment:
CMAKE_FLAGS: '-DUNITS_ENABLE_TESTS=ON -DUNITS_INSTALL_PACKAGE_TESTS=ON -DUNITS_BUILD_SHARED_LIBRARY=ON'
CMAKE_FLAGS: "-DUNITS_ENABLE_TESTS=ON -DUNITS_INSTALL_PACKAGE_TESTS=ON -DUNITS_BUILD_SHARED_LIBRARY=ON"
steps:
- checkout
- run: *setup_units
Expand All @@ -100,7 +100,7 @@ jobs:
docker:
- image: helics/buildenv:builder
environment:
CMAKE_FLAGS: '-DUNITS_ENABLE_TESTS=ON -DUNITS_INSTALL_PACKAGE_TESTS=ON -DUNITS_BUILD_SHARED_LIBRARY=ON -DUNITS_CMAKE_PROJECT_NAME=LLNL-UNITS'
CMAKE_FLAGS: "-DUNITS_ENABLE_TESTS=ON -DUNITS_INSTALL_PACKAGE_TESTS=ON -DUNITS_BUILD_SHARED_LIBRARY=ON -DUNITS_CMAKE_PROJECT_NAME=LLNL-UNITS"
steps:
- checkout
- run: *setup_units
Expand Down
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
- package-ecosystem: 'github-actions' # See documentation for possible values
directory: '/' # Location of package manifests
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: 'weekly'
interval: "weekly"
172 changes: 86 additions & 86 deletions config/docker_rules.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
profile:
name: 'helics docker images'
description: 'HELICS Profile. Checks basic syntax and required labels'
name: "helics docker images"
description: "HELICS Profile. Checks basic syntax and required labels"
includes:
#- recommended_label_rules.yaml
line_rules:
Expand All @@ -18,147 +18,147 @@ line_rules:
Name:
valueRegex: /[\w]+/
message: "Label 'Name' is missing or has invalid format"
level: 'warn'
level: "warn"
required: true
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_recommended_labels_for_your_project'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_recommended_labels_for_your_project"
Version:
valueRegex: /[\w.${}()"'\\\/~<>\-?\%:]+/
message: "Label 'Version' is missing or has invalid format"
level: 'warn'
level: "warn"
required: true
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_recommended_labels_for_your_project'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_recommended_labels_for_your_project"
Release:
valueRegex: /[\w.${}()"'\\\/~<>\-?\%:]+/
message: "Label 'Release' is missing or has invalid format"
level: 'warn'
level: "warn"
required: false
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_recommended_labels_for_your_project'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_recommended_labels_for_your_project"
Architecture:
valueRegex: /[\w]*[6,8][4,6]|[.]*86[.]*64/
message: "Label 'Architecture' is missing or has invalid format: x86, i386, x86_64"
level: 'info'
level: "info"
required: false
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_recommended_labels_for_your_project'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_recommended_labels_for_your_project"
Vendor:
valueRegex: /([\w]+).+/
message: "Label 'Vendor' is missing or has invalid format"
level: 'warn'
level: "warn"
required: false
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_recommended_labels_for_your_project'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_recommended_labels_for_your_project"
Url:
valueRegex: /([\w]+).+/
message: "Label 'Url' is missing or has invalid format"
level: 'warn'
level: "warn"
required: false
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_recommended_labels_for_your_project'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_recommended_labels_for_your_project"
Help:
valueRegex: /([\w]+).+/
message: "Label 'Help' is missing or has invalid format"
level: 'warn'
level: "warn"
required: false
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_recommended_labels_for_your_project'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_recommended_labels_for_your_project"

FROM:
paramSyntaxRegex: /^[\w./\-:]+(:[${}\w.]+)?(-[${}\w.]+)?( as \w+)?$/i
rules:
- label: 'no_tag'
- label: "no_tag"
regex: /^[:]/
level: 'error'
message: 'No tag is used'
description: 'lorem ipsum tar'
level: "error"
message: "No tag is used"
description: "lorem ipsum tar"
reference_url:
- 'https://docs.docker.com/engine/reference/builder/'
- '#from'
- "https://docs.docker.com/engine/reference/builder/"
- "#from"
MAINTAINER:
paramSyntaxRegex: /.+/
rules: []
RUN:
paramSyntaxRegex: /.+/
rules:
- label: 'no_yum_clean_all'
- label: "no_yum_clean_all"
regex: /yum(?!.+clean all|.+\.repo|-config|\.conf)/
level: 'warn'
message: 'yum clean all is not used'
description: 'the yum cache will remain in this layer making the layer unnecessarily large'
level: "warn"
message: "yum clean all is not used"
description: "the yum cache will remain in this layer making the layer unnecessarily large"
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_clear_packaging_caches_and_temporary_package_downloads'
- label: 'yum_update_all'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_clear_packaging_caches_and_temporary_package_downloads"
- label: "yum_update_all"
regex: /yum(.+update all|.+upgrade|.+update)/
level: 'info'
message: 'updating the entire base image may add unnecessary size to the container'
description: 'update the entire base image may add unnecessary size to the container'
level: "info"
message: "updating the entire base image may add unnecessary size to the container"
description: "update the entire base image may add unnecessary size to the container"
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_clear_packaging_caches_and_temporary_package_downloads'
- label: 'no_dnf_clean_all'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_clear_packaging_caches_and_temporary_package_downloads"
- label: "no_dnf_clean_all"
regex: /dnf(?!.+clean all|.+\.repo)/g
level: 'warn'
message: 'dnf clean all is not used'
description: 'the dnf cache will remain in this layer making the layer unnecessarily large'
level: "warn"
message: "dnf clean all is not used"
description: "the dnf cache will remain in this layer making the layer unnecessarily large"
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_clear_packaging_caches_and_temporary_package_downloads'
- label: 'no_rvm_cleanup_all'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_clear_packaging_caches_and_temporary_package_downloads"
- label: "no_rvm_cleanup_all"
regex: /rvm install(?!.+cleanup all)/g
level: 'warn'
message: 'rvm cleanup is not used'
description: 'the rvm cache will remain in this layer making the layer unnecessarily large'
level: "warn"
message: "rvm cleanup is not used"
description: "the rvm cache will remain in this layer making the layer unnecessarily large"
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_clear_packaging_caches_and_temporary_package_downloads'
- label: 'no_gem_clean_all'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_clear_packaging_caches_and_temporary_package_downloads"
- label: "no_gem_clean_all"
regex: /gem install(?!.+cleanup|.+\rvm cleanup all)/g
level: 'warn'
message: 'gem cleanup all is not used'
description: 'the gem cache will remain in this layer making the layer unnecessarily large'
level: "warn"
message: "gem cleanup all is not used"
description: "the gem cache will remain in this layer making the layer unnecessarily large"
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_clear_packaging_caches_and_temporary_package_downloads'
- label: 'no_apt-get_clean'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_clear_packaging_caches_and_temporary_package_downloads"
- label: "no_apt-get_clean"
regex: /apt-get install(?!.+clean)/g
level: 'info'
message: 'apt-get clean is not used'
description: 'the apt-get cache will remain in this layer making the layer unnecessarily large'
level: "info"
message: "apt-get clean is not used"
description: "the apt-get cache will remain in this layer making the layer unnecessarily large"
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '_clear_packaging_caches_and_temporary_package_downloads'
- label: 'privileged_run_container'
- "http://docs.projectatomic.io/container-best-practices/#"
- "_clear_packaging_caches_and_temporary_package_downloads"
- label: "privileged_run_container"
regex: /privileged/
level: 'warn'
message: 'a privileged run container is allowed access to host devices'
description: 'Does this run need to be privileged?'
level: "warn"
message: "a privileged run container is allowed access to host devices"
description: "Does this run need to be privileged?"
reference_url:
- 'http://docs.docker.com/engine/reference/run/#'
- 'runtime-privilege-and-linux-capabilities'
- label: 'installing_ssh'
- "http://docs.docker.com/engine/reference/run/#"
- "runtime-privilege-and-linux-capabilities"
- label: "installing_ssh"
regex: /openssh-server/
level: 'warn'
message: 'installing SSH in a container is not recommended'
description: 'Do you really need SSH in this image?'
reference_url: 'https://github.com/jpetazzo/nsenter'
- label: 'no_ampersand_usage'
level: "warn"
message: "installing SSH in a container is not recommended"
description: "Do you really need SSH in this image?"
reference_url: "https://github.com/jpetazzo/nsenter"
- label: "no_ampersand_usage"
regex: / ; /
level: 'info'
message: 'using ; instead of &&'
description: 'RUN do_1 && do_2: The ampersands change the resulting evaluation into do_1 and then do_2 only if do_1 was successful.'
level: "info"
message: "using ; instead of &&"
description: "RUN do_1 && do_2: The ampersands change the resulting evaluation into do_1 and then do_2 only if do_1 was successful."
reference_url:
- 'http://docs.projectatomic.io/container-best-practices/#'
- '#_using_semi_colons_vs_double_ampersands'
- "http://docs.projectatomic.io/container-best-practices/#"
- "#_using_semi_colons_vs_double_ampersands"
EXPOSE:
paramSyntaxRegex: /^[\d-\s\w/\\]+$/
rules: []
Expand Down Expand Up @@ -187,10 +187,10 @@ line_rules:
rules: []
required_instructions:
- count: 1
description: 'Labels are needed to identify information about the docker image'
description: "Labels are needed to identify information about the docker image"
instruction: LABEL
level: error
message: 'No LABELs are defined'
message: "No LABELs are defined"
reference_url:
- 'https://docs.docker.com/engine/reference/builder/'
- '#label'
- "https://docs.docker.com/engine/reference/builder/"
- "#label"

0 comments on commit 5223d96

Please sign in to comment.