Skip to content

Commit

Permalink
doc: insert license header
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbuchmann committed Nov 20, 2023
1 parent f8007d9 commit 8566d4c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,47 @@ repos:
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-merge-conflict
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- name: Check and insert license on Python files
id: insert-license
exclude: ansible_collections/arista/cvp/(plugins|tests/unit(/module_utils|/modules|))/__init__.py
files: .*\.py$
args:
- --license-filepath
- development/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --no-extra-eol

- name: Check and insert license on Jinja2 files
id: insert-license
files: .*\.j2$
exclude: ansible_collections/arista/cvp/molecule.*
args:
- --license-filepath
- development/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --comment-style
- '{#||#}'
- --no-extra-eol

- name: Check and insert license on Markdown files
id: insert-license
files: .*\.md$
exclude: (ansible_collections/arista/cvp/molecule|.github|ansible_collections/arista/cvp/examples/.+/documentation/).*
args:
- --license-filepath
- development/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --comment-style
- '<!--| ~| -->'

- repo: https://github.com/pycqa/pylint
rev: "v2.16.1"
Expand Down
3 changes: 3 additions & 0 deletions development/license-short.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Copyright (c) 2023 Arista Networks, Inc.
Use of this source code is governed by the Apache License 2.0
that can be found in the LICENSE file.

0 comments on commit 8566d4c

Please sign in to comment.