Skip to content

Commit 982d216

Browse files
committedSep 18, 2023
pre-comit: generate configs
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
1 parent 766ecad commit 982d216

6 files changed

+290
-0
lines changed
 

‎.codespellrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[codespell]
2+
exclude-file = .codespellx
3+
ignore-words-list = "FPT,FTP,fpt,ftp"

‎.codespellx

Whitespace-only changes.

‎.conform.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
policies:
3+
- type: commit
4+
spec:
5+
header:
6+
length: 80
7+
imperative: false
8+
invalidLastCharacters: .
9+
body:
10+
required: false
11+
dco: true
12+
gpg:
13+
required: true
14+
spellcheck:
15+
locale: US
16+
maximumOfOneCommit: false

‎.markdownlint.yaml

+196
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
---
2+
# Documentation:
3+
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
4+
5+
# Default state for all rules
6+
default: false
7+
8+
# MD001/heading-increment/header-increment - Heading levels should only increment by one level at a time
9+
MD001: true
10+
11+
# MD002/first-heading-h1/first-header-h1 - First heading should be a top-level heading
12+
MD002:
13+
# Heading level
14+
level: 1
15+
16+
# MD003/heading-style/header-style - Heading style
17+
18+
MD003:
19+
# Heading style
20+
# # ATX style H1
21+
style: "atx"
22+
23+
# MD004/ul-style - Unordered list style
24+
MD004:
25+
# List style
26+
style: "sublist"
27+
28+
# MD005/list-indent - Inconsistent indentation for list items at the same level
29+
MD005: true
30+
31+
# MD006/ul-start-left - Consider starting bulleted lists at the beginning of the line
32+
MD006: true
33+
34+
# MD007/ul-indent - Unordered list indentation
35+
MD007:
36+
# Spaces for indent
37+
indent: 4
38+
# Whether to indent the first level of the list
39+
start_indented: false
40+
41+
# MD009/no-trailing-spaces - Trailing spaces
42+
MD009:
43+
# Spaces for line break
44+
br_spaces: 2
45+
# Allow spaces for empty lines in list items
46+
list_item_empty_lines: false
47+
# Include unnecessary breaks
48+
strict: false
49+
50+
# MD010/no-hard-tabs - Hard tabs
51+
MD010:
52+
# Include code blocks
53+
code_blocks: false
54+
# Number of spaces for each hard tab
55+
spaces_per_tab: 1
56+
57+
# MD011/no-reversed-links - Reversed link syntax
58+
MD011: true
59+
60+
# MD012/no-multiple-blanks - Multiple consecutive blank lines
61+
MD012:
62+
# Consecutive blank lines
63+
maximum: 1
64+
# MD013/line-length - Line length
65+
#
66+
MD013:
67+
# Number of characters
68+
line_length: 80
69+
# Number of characters for headings
70+
heading_line_length: 80
71+
# Number of characters for code blocks
72+
code_block_line_length: 160
73+
# Include code blocks
74+
code_blocks: false
75+
# Include tables
76+
tables: false
77+
# Include headings
78+
headings: true
79+
# Strict length checking (e.g. allow for longer URLs)
80+
strict: false
81+
# Stern length checking
82+
stern: false
83+
84+
# MD014/commands-show-output - Dollar signs used before commands without showing output
85+
# TODO: set false for now but we should consider enabling it
86+
# https://cirosantilli.com/markdown-style-guide#dollar-signs-in-shell-code
87+
MD014: false
88+
89+
# MD018/no-missing-space-atx - No space after hash on atx style heading
90+
MD018: true
91+
92+
# MD019/no-multiple-space-atx - Multiple spaces after hash on atx style heading
93+
MD019: true
94+
95+
# MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines
96+
MD022:
97+
# Blank lines above heading
98+
lines_above: 1
99+
# Blank lines below heading
100+
lines_below: 1
101+
102+
# MD023/heading-start-left/header-start-left - Headings must start at the beginning of the line
103+
MD023: true
104+
105+
# MD025/single-title/single-h1 - Multiple top-level headings in the same document
106+
# TODO: consider enabling it
107+
108+
# MD026/no-trailing-punctuation - Trailing punctuation in heading
109+
MD026:
110+
# Punctuation characters
111+
punctuation: ".,;:!。,;:!"
112+
113+
# MD027/no-multiple-space-blockquote - Multiple spaces after blockquote symbol
114+
MD027: true
115+
116+
# MD028/no-blanks-blockquote - Blank line inside blockquote
117+
MD028: true
118+
119+
# MD029/ol-prefix - Ordered list item prefix
120+
MD029:
121+
# List style
122+
style: "one_or_ordered"
123+
124+
# MD030/list-marker-space - Spaces after list markers
125+
MD030:
126+
# Spaces for single-line unordered list items
127+
ul_single: 1
128+
# Spaces for single-line ordered list items
129+
ol_single: 1
130+
# Spaces for multi-line unordered list items
131+
ul_multi: 1
132+
# Spaces for multi-line ordered list items
133+
ol_multi: 1
134+
135+
# MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines
136+
MD031:
137+
# Include list items
138+
list_items: true
139+
140+
# MD033/no-inline-html - Inline HTML
141+
MD033:
142+
# Allowed elements
143+
allowed_elements: ["br", "center", "img", "script", "form", "input"]
144+
145+
# MD034/no-bare-urls - Bare URL used
146+
MD034: true
147+
148+
# MD035/hr-style - Horizontal rule style
149+
MD035:
150+
# Horizontal rule style
151+
style: "---"
152+
153+
# MD037/no-space-in-emphasis - Spaces inside emphasis markers
154+
MD037: true
155+
156+
# MD038/no-space-in-code - Spaces inside code span elements
157+
MD038: true
158+
159+
# MD039/no-space-in-links - Spaces inside link text
160+
MD039: true
161+
162+
# MD040/fenced-code-language - Fenced code blocks should have a language specified
163+
MD040: true
164+
165+
# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading
166+
MD041:
167+
# Heading level
168+
level: 1
169+
# RegExp for matching title in front matter
170+
front_matter_title: "^\\s*title\\s*[:=]"
171+
172+
# MD042/no-empty-links - No empty links
173+
MD042: true
174+
175+
# MD046/code-block-style - Code block style
176+
MD046:
177+
# Block style
178+
style: "fenced"
179+
180+
# MD047/single-trailing-newline - Files should end with a single newline character
181+
MD047: true
182+
183+
# MD048/code-fence-style - Code fence style
184+
MD048:
185+
# Code fence style
186+
style: "backtick"
187+
188+
# MD049/emphasis-style - Emphasis style should be consistent
189+
MD049:
190+
# Emphasis style should be consistent
191+
style: "underscore"
192+
193+
# MD050/strong-style - Strong style should be consistent
194+
MD050:
195+
# Strong style should be consistent
196+
style: "asterisk"

‎.pre-commit-config.yaml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
default_stages: [pre-commit]
3+
4+
default_install_hook_types: [pre-commit, commit-msg]
5+
6+
ci:
7+
autoupdate_commit_msg: 'pre-commit: autoupdate hooks'
8+
autofix_prs: false
9+
10+
repos:
11+
- repo: https://github.com/pre-commit/pre-commit-hooks
12+
rev: v4.4.0
13+
hooks:
14+
- id: check-added-large-files
15+
- id: check-merge-conflict
16+
- id: check-symlinks
17+
- id: detect-private-key
18+
- id: end-of-file-fixer
19+
- id: trailing-whitespace
20+
- id: mixed-line-ending
21+
22+
- repo: https://github.com/talos-systems/conform
23+
rev: v0.1.0-alpha.27
24+
hooks:
25+
- id: conform
26+
stages:
27+
- commit-msg
28+
29+
- repo: https://github.com/codespell-project/codespell
30+
rev: v2.2.5
31+
hooks:
32+
- id: codespell
33+
34+
- repo: https://github.com/igorshubovych/markdownlint-cli
35+
rev: v0.36.0
36+
hooks:
37+
- id: markdownlint
38+
- id: markdownlint-fix
39+
40+
- repo: https://github.com/pycqa/isort
41+
rev: 5.12.0
42+
hooks:
43+
- id: isort
44+
name: isort (python)
45+
46+
- repo: https://github.com/psf/black
47+
rev: 23.9.1
48+
hooks:
49+
- id: black
50+
51+
- repo: https://github.com/MarketSquare/robotframework-tidy
52+
rev: 4.5.0
53+
hooks:
54+
- id: robotidy
55+
56+
- repo: https://github.com/MarketSquare/robotframework-robocop
57+
rev: 4.1.1
58+
hooks:
59+
- id: robocop

‎.yamllint

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
extends: default
3+
4+
rules:
5+
comments:
6+
require-starting-space: true
7+
ignore-shebangs: true
8+
min-spaces-from-content: 2
9+
document-start:
10+
present: true
11+
level: error
12+
indentation:
13+
spaces: 2
14+
line-length: disable
15+
truthy:
16+
check-keys: false

0 commit comments

Comments
 (0)
Please sign in to comment.