Commit 0ae15379 authored by Federico Falconieri's avatar Federico Falconieri
Browse files

Merge branch '43-chore-fix-yamllint-failures-in-our-repo' into 'master'

chore: several minor improvements

Closes #43

See merge request ci/templates!24
parents 36109cfb 69d7f46b
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+4 −0
Original line number Diff line number Diff line
.venv
.vscode
templates_tests/python/.venv
templates_tests/python/.mypy_cache
+4 −2
Original line number Diff line number Diff line
---
variables:
  PYTHON_PACKAGE: "templates_tests/python/mypackage"

@@ -38,7 +39,8 @@ python:pytest:
    # We need to move here so it's added to PYTHONPATH
    - cd templates_tests/python
  variables:
    # Not happy with this, but we need it so --cov works, without breaking other jobs
    # Not happy with this, but we need it so --cov works
    # without breaking other jobs
    PYTHON_PACKAGE: mypackage

c:cppcheck:
+31 −0
Original line number Diff line number Diff line
---
fail_fast: true
default_stages: [commit]
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v3.4.0
    hooks:
      - id: check-yaml
      - id: check-added-large-files
      - id: detect-private-key
      - id: check-executables-have-shebangs
      - id: check-merge-conflict
      - id: end-of-file-fixer
      - id: trailing-whitespace
      - id: mixed-line-ending
        args: ['--fix=lf']
        description: Forces to replace line ending by the UNIX 'lf' character.
  - repo: local
    hooks:
      - id: system
        name: yamllint
        entry: poetry run yamllint .
        pass_filenames: false
        always_run: true
        language: system
  - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
    rev: v2.2.0
    hooks:
      - id: commitlint
        stages: [commit-msg]
        additional_dependencies: ['@commitlint/config-conventional']
+11 −0
Original line number Diff line number Diff line
@@ -3,3 +3,14 @@
Would you like to contribute? There are 2 ways:
1. Fork this project, commit your changes there, and do a Merge Request against this project. Don't forget to assign either @falconierif or @hoverht to have a look at your code.
2. Ask us to become a Developer in this repo, so you can develop in a branch here.

### pre-commit hooks
We use pre-commit hooks in this project.
You don't have to use them, but if you want you can install them this way:
```bash
pip3 install poetry
poetry install
poetry run pre-commit install
poetry run pre-commit install --hook-type commit-msg
poetry run pre-commit install --hook-type post-commit
```
+5 −1
Original line number Diff line number Diff line
---
# This job will create or update a version badge containing the latest tag.
# It requires a Project Access Token set as a CI/CD variable called GL_TOKEN
# Also make sure you have set a protected tags wildcard as "v*"
# If you want to disable badges, set a global variable called "I_DONT_LIKE_BADGES"
# If you want to disable badges,
# set a global variable called "I_DONT_LIKE_BADGES"

# yamllint disable rule:line-length

semantic-release:badge:
  image: bash:latest
Loading