Skip to content

Commit

Permalink
Merge branch 'fix/ci' into 'master'
Browse files Browse the repository at this point in the history
ci fixes

See merge request sfcgal/SFCGAL!308
  • Loading branch information
lbartoletti committed Apr 11, 2024
2 parents 4fb71ef + 06a5dd6 commit c045bdc
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Checks: '-p=build,-*,clang-analyzer-*,cert-*,bugprone-*,misc-*,modernize-*,performance-*,portability-*,readability-*,-header-filter=.*'
Checks: '-p=build,-*,clang-analyzer-*,cert-*,bugprone-*,modernize-*,performance-*,portability-*,readability-*,-header-filter=.*'
CheckOptions:
- key: bugprone-argument-comment.StrictMode
value: 1
FormatStyle: 'file'
HeaderFileExtensions: ['', 'h','hpp']
ImplementationFileExtensions: ['c','cpp']
7 changes: 6 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

stages:
- .pre
- lint
- build
- test
- deploy
- .post

# After ccache ci
# coverage:
Expand All @@ -25,6 +26,10 @@ stages:
# cobertura: sfcgal_coverage.xml

include:
- template: Security/SAST.gitlab-ci.yml
- local: /.gitlab/pipeline/sonar.yml
- local: /.gitlab/pipeline/lint-code.yml
- local: /.gitlab/pipeline/test-code.yml

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

# Don't run pre-commit on files under third-party/
exclude: "^\
(third-party/.*)\
"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files # prevents giant files from being committed.
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystems.
- id: check-merge-conflict # checks for files that contain merge conflict strings.
- id: check-yaml # checks yaml files for parseable syntax.
- id: detect-private-key # detects the presence of private keys.
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline.
- id: fix-byte-order-marker # removes utf-8 byte order marker.
- id: mixed-line-ending # replaces or checks mixed line ending.
- id: requirements-txt-fixer # sorts entries in requirements.txt.
- id: trailing-whitespace # trims trailing whitespace.

- repo: https://github.com/ssciwr/clang-format-hook
rev: v16.0.2
hooks:
- id: clang-format
# args: [--style=file:/home/bde/prog/sfcgal/SFCGAL/.clang-format]
files: \.(c|h|cpp|hpp)$

# - repo: https://github.com/pocc/pre-commit-hooks
# rev: v1.3.5
# hooks:
# - id: clang-tidy
# files: (src|tests)/.*\.(c|h|cpp|hpp)$

# - id: cppcheck
# name: cppcheck
# entry: cppcheck
# language: system
# args:
# [
# --enable=all,
# --suppress=unusedFunction,
# --suppress=unmatchedSuppression,
# --suppress=missingIncludeSystem,
# --suppress=toomanyconfigs,
# --error-exitcode=1,
# --language=c++,
# ]
# files: \.(c|h|cpp|hpp)$

0 comments on commit c045bdc

Please sign in to comment.