From fa7884c1d59a2b8280ede89b4772e5c0b43292c3 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Wed, 28 Apr 2021 22:55:07 +0300
Subject: [PATCH] Boilerplate.

---
 .gitignore              | 52 ++++++++++++++++++++++++++++++++++++++
 .gitlab-ci.yml          |  6 +++++
 .pre-commit-config.yaml | 55 +++++++++++++++++++++++++++++++++++++++++
 LICENSE.txt             | 21 ++++++++++++++++
 README.md               | 31 +++++++++++++++++++++++
 5 files changed, 165 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 .gitlab-ci.yml
 create mode 100644 .pre-commit-config.yaml
 create mode 100644 LICENSE.txt
 create mode 100644 README.md

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..62c0b50
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,52 @@
+~*
+*~
+*.sw[op]
+*.py[cod]
+.DS_Store
+__pycache__/
+.vagrant/
+vendor/
+Thumbs.db
+*.retry
+.svn/
+.sass-cache/
+*.log
+*.out
+*.so
+node_modules/
+.npm/
+nbproject/
+*.ipynb
+.idea/
+*.egg-info/
+*.[ao]
+.classpath
+.cache/
+bower_components/
+*.class
+*.[ewj]ar
+secring.*
+.*.kate-swp
+.swp.*
+.directory
+.Trash-*
+build/
+_build/
+dist/
+.tox/
+*.pdf
+*.exe
+*.dll
+*.gz
+*.tgz
+*.tar
+*.rar
+*.zip
+*.pid
+*.lock
+*.env
+.bundle/
+!Pipfile.lock
+.terraform
+tfplan
+*.tfstate*
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..1f0ae53
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,6 @@
+---
+include:
+  - project: shore/ci-templates
+    file: templates/pre-commit.yml
+  - project: shore/ci-templates
+    file: templates/pre-commit-repo.yml
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..fd3c295
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,55 @@
+---
+repos:
+  - repo: https://github.com/pre-commit/pre-commit-hooks.git
+    rev: v3.4.0
+    hooks:
+      - id: check-added-large-files
+      - id: check-executables-have-shebangs
+      - id: check-merge-conflict
+      - id: check-symlinks
+      - id: trailing-whitespace
+
+  - repo: https://github.com/Yelp/detect-secrets
+    rev: v1.1.0
+    hooks:
+      - id: detect-secrets
+
+  - repo: https://github.com/adrienverge/yamllint
+    rev: v1.26.1
+    hooks:
+      - id: yamllint
+
+  - repo: https://github.com/amperser/proselint/
+    rev: 0.10.2
+    hooks:
+      - id: proselint
+        types: [plain-text]
+        exclude: LICENSE
+
+  - repo: https://github.com/executablebooks/mdformat.git
+    rev: 0.7.5
+    hooks:
+      - id: mdformat
+
+  - repo: https://github.com/pre-commit/pre-commit.git
+    rev: v2.12.1
+    hooks:
+      - id: validate_manifest
+
+  - repo: https://gitlab.com/devopshq/gitlab-ci-linter
+    rev: v1.0.3
+    hooks:
+      - id: gitlab-ci-linter
+        args:
+          - "--server"
+          - https://git.shore.co.il
+
+  - repo: https://git.shore.co.il/nimrod/shell-pre-commit.git
+    rev: v0.6.0
+    hooks:
+      - id: shell-lint
+
+  - repo: https://github.com/shellcheck-py/shellcheck-py.git
+    rev: v0.7.2.1
+    hooks:
+      - id: shellcheck
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..a9e1ecf
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021 Adar Nimrod
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..eb05076
--- /dev/null
+++ b/README.md
@@ -0,0 +1,31 @@
+# Terraform pre-commmit
+
+[![pipeline status](https://git.shore.co.il/nimrod/terraform-pre-commit/badges/master/pipeline.svg)](https://git.shore.co.il/nimrod/terraform-pre-commit/-/commits/master)
+
+Terraform [pre-commit](https://pre-commit.com/) hooks.
+
+## Requirements
+
+- [pre-commit](https://pre-commit.com/) 0.18.0 or later.
+- [Terraform](https://www.terraform.io/)
+
+## Usage example
+
+```yaml
+- repo: https://git.shore.co.il/nimrod/terraform-pre-commit.git
+  rev: v0.1.0
+  hooks:
+    - id: tf-fmt
+    - id: tf-validate
+```
+
+## License
+
+This software is licensed under the MIT license (see `LICENSE.txt`).
+
+## Author Information
+
+Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my
+[website](https://www.shore.co.il/). Patches are welcome via
+[`git send-email`](http://git-scm.com/book/en/v2/Git-Commands-Email). The repository
+is located at: <https://git.shore.co.il/explore/>.
-- 
GitLab