-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
headerrc-default.yml
181 lines (155 loc) · 4.9 KB
/
headerrc-default.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# This file containers the default values for this action.
# Any items added to the .headerrc file will be *merged* with this one.
# Duplicate values will be overwritten from the .headerrc.
name: This file is used to set configuration for the add-header action
# Choose what to do with the header.
# remove = Remove an existing header from matching files.
# add = Add the header to any matching files.
header_action: add # Default: add
# Decide the method for choosing which files to add headers to
# opt-out = all files will be selected unless the file path matches untracked_files
# opt-in = no files will be selected unless the file path matches anything in tracked_files
file_mode: opt-out
tracked_files:
- a-list-of-files-to-be-tracked.default-item
# Remove items from the default values by using a !. Like "!^.git/"
untracked_files:
- ^\.git/ # Very important to ignore
- ^\.gitignore
- ^LICENSE$
- __init__.py$ # These are just empty files
- \.json$ # Most json files cannot contain comments
- \.png$
- \.jpe?g$
# Automatically add everything in the .gitignore file into the untracked_files section
# This can save lots of time because most of these files can be ignored.
untrack_gitignore: true
negate_characters: "!"
# With this enabled, the following settings are not loaded, and must be provided from the .headerrc file.
# tracked_files, untracked_files, file_associations_by_comment, file_associations_by_extension, skip_lines_that_have
use_default_file_settings: true
# The header to be inserted in matching files
header: |
SUPER SECRET CONFIDENTIAL
[2023] - [Infinity and Beyond] ACME Inc
All Rights Reserved.
NOTICE: This is super secret info that
must be protected at all costs.
# Group multiple items by the comment value
file_associations_by_comment: #Format = Comment: List[Regex for file match]
"#": # Shell-like single-line comment
- "^.gitignore$"
- "\\.*\\.ya?ml$"
- "\\.sh$"
- "\\.bash$"
- "\\.zsh$"
- "\\.yaml$"
- "\\.yml$"
- "\\.py$"
- "\\.r$"
- "\\.rb$"
- "\\.gemspec$"
- "\\.podspec$"
- "\\.sls$"
- "^Dockerfile$"
- "\\.tf$" # Terraform
- "\\.pl$" # Perl
- "\\.cgi$"
- "\\.awk$"
- "\\.sed$"
- "\\.env$"
"//": # C-like single-line comment
- "\\.c$"
- "\\.json5$"
- "\\.h$"
- "\\.cpp$"
- "\\.hpp$"
- "\\.cc$"
- "\\.hh$"
- "\\.cxx$"
- "\\.hxx$"
- "\\.cs$"
- "\\.java$"
- "\\.js$"
- "\\.jsx$"
- "\\.ts$"
- "\\.tsx$"
- "\\.m$"
- "\\.mm$"
- "\\.swift$"
- "\\.go$" # Go
- "\\.rs$" # Rust
- "\\.dart$"
- "\\.php$"
- "\\.css$"
- "\\.scss$"
- "\\.sass$"
- "\\.kt$" # Kotlin single-line comment
- "\\.kts$"
- "\\.ktm$"
"%": # LaTeX, Matlab comment
- "\\.tex$"
- "\\.sty$"
- "\\.cls$"
- "\\.m$"
- "\\.mlx$"
"REM": # Batch files
- "\\.bat$"
- "\\.cmd$"
"/*": # Kotlin multi-line comment
- "\\.kt$"
- "\\.kts$"
- "\\.ktm$"
"--": # SQL, Lua, Haskell comment
- "\\.sql$"
- "\\.lua$"
- "\\.hs$"
- "\\.lhs$"
- "\\.tpl$"
- "\\.pks$"
- "\\.pkb$"
";": # Ini, Clojure, Lisp-like comment
- "\\.ini$"
- "\\.conf$"
- "\\.cfg$"
- "\\.clj$"
- "\\.cljs$"
- "\\.lisp$"
- "\\.asl$"
- "\\.el$"
# The item extension and the associated comment. Overrides file_associations_by_comment
# Remember the escape charter for yml \
file_associations_by_extension: # Format = Regex for file match: List[prefix, suffix]|str.
"\\.md$": ["<!--", "-->"] # Markdown
"\\.html$": ["<!--", "-->"] # HTML
"\\.htm$": ["<!--", "-->"] # HTML
"\\.xhtml$": ["<!--", "-->"] # XHTML
"\\.xml$": ["<!--", "-->"] # XML
"\\.svg$": ["<!--", "-->"] # Scalable Vector Graphics
"\\.jsp$": ["<!--", "-->"] # Java Server Pages
"\\.vue$": ["<!--", "-->"] # Vue.js Single-File Components
"\\.svelte$": ["<!--", "-->"] # Svelte Single-File Components
"\\.css$": ["/*", "*/"] # Cascading Style Sheets
"\\.scss$": ["/*", "*/"] # Sassy CSS
"\\.sass$": ["/*", "*/"] # Syntactically Awesome Stylesheets
"\\.js$": ["/*", "*/"] # JavaScript
"\\.jsx$": ["/*", "*/"] # JavaScript XML
"\\.ts$": ["/*", "*/"] # TypeScript
"\\.tsx$": ["/*", "*/"] # TypeScript XML
"\\.c$": ["/*", "*/"] # C
"\\.cpp$": ["/*", "*/"] # C++
"\\.h$": ["/*", "*/"] # C Header
"\\.hpp$": ["/*", "*/"] # C++ Header
"\\.java$": ["/*", "*/"] # Java
"\\.cs$": ["/*", "*/"] # C#
"\\.go$": ["/*", "*/"] # Go
"\\.kt$": ["/*", "*/"] # Kotlin
"\\.swift$": ["/*", "*/"] # Swift
"\\.php$": ["/*", "*/"] # PHP
"\\.rs$": ["/*", "*/"] # Rust
"\\.m$": ["/*", "*/"] # Objective-C
"\\.mm$": ["/*", "*/"] # Objective-C++
# For files that have 'important' first lines, use this setting to move the header below that line
skip_lines_that_have: # Format = Regex for file match: List|str
"\\.sh$": ["^#!"]
"\\.html$": ["<!DOCTYPE"]