mirror of
https://gitlab.fabcity.hamburg/software/fab-city-software-kit.git
synced 2024-09-19 20:08:52 +02:00
added pre-commit hooks
This commit is contained in:
parent
eb9fe1b939
commit
e3cd75780d
17
.envrc
17
.envrc
|
@ -1,16 +1,7 @@
|
|||
if ! has nix_direnv_version || ! nix_direnv_version 2.1.1; then
|
||||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.1.1/direnvrc" "sha256-b6qJ4r34rbE23yWjMqbmu3ia2z4b2wIlZUksBke/ol0="
|
||||
fi
|
||||
|
||||
watch_file **/*.nix
|
||||
watch_file flake.lock
|
||||
use flake
|
||||
|
||||
if (nix help flake &> /dev/null)
|
||||
then
|
||||
use flake
|
||||
watch_file ./nix/checks.nix
|
||||
watch_file ./nix/dev-shell.nix
|
||||
|
||||
else
|
||||
use nix
|
||||
fi
|
||||
|
||||
eval "$shellHook"
|
||||
eval "$shellHook"
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,7 +2,6 @@
|
|||
.*.swp
|
||||
.direnv
|
||||
.DS_Store
|
||||
.pre-commit-config.yaml
|
||||
*.tgz
|
||||
/.idea/*
|
||||
.vscode/*.log
|
||||
|
|
27
.pre-commit-config.yaml
Normal file
27
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.3.0
|
||||
hooks:
|
||||
- id: check-added-large-files
|
||||
- id: check-builtin-literals
|
||||
- id: check-case-conflict
|
||||
- id: check-docstring-first
|
||||
- id: check-json
|
||||
- id: check-merge-conflict
|
||||
- id: check-yaml
|
||||
- id: detect-private-key
|
||||
- id: double-quote-string-fixer
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
|
||||
- repo: https://github.com/crate-ci/typos
|
||||
rev: v1.10.3
|
||||
hooks:
|
||||
- id: typos
|
||||
|
||||
- repo: https://github.com/adrienverge/yamllint
|
||||
rev: v1.27.1
|
||||
hooks:
|
||||
- id: yamllint
|
||||
files: '.*(?<!\.yaml)$'
|
16
flake.nix
16
flake.nix
|
@ -9,10 +9,14 @@
|
|||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
||||
{
|
||||
devShells.default = import ./shell.nix { inherit pkgs; };
|
||||
}
|
||||
);
|
||||
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowBroken = true;
|
||||
};
|
||||
};
|
||||
in { devShells.default = import ./shell.nix { inherit pkgs; }; });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue