Skip to content

gabyx/Githooks-Configs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Githooks for Configuration Files

This repository contains shared repository Git hooks for shell scripts in githooks/* to be used with the Githooks Manager.

The following hooks are included:

  • Hook to format configuration files .yaml, .toml, .json files with prettier (pre-commit).
Table of Content (click to expand)

Requirements

Run them containerized where only docker is required.

If you want to run them non-containerized, make the following installed on your system:

This works with Windows setups too.

Installation

The hooks can be used by simply using this repository as a shared hook repository inside shell projects. See further documentation.

You should configure the shared hook repository in your project to use this repos main branch by using the following .githooks/.shared.yaml :

version: 1
urls:
  - https://github.com/gabyx/githooks-configs.git@main`.

Hook: pre-commit/1-format/format-configs.yaml

Formatting with prettier.

Scripts

The following scripts are provided:

shellHooks=$(git hooks shared root ns:githooks-docs)
"$shellHooks/githooks/scripts/<script-name>.sh"

Testing

The containerized tests in tests/* are executed by

tests/test.sh

or only special tests steps by

tests/test.sh --seq 001..010

For showing the output also in case of success use:

tests/test.sh --show-output [other-args]

About

Githooks for configuration files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published