Skip to content

Commit d1ca78e

Browse files
committed
feat: add support for .ini files
Signed-off-by: Adam Moss <[email protected]>
1 parent 4d54809 commit d1ca78e

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ func licenseHeader(path string, tmpl *template.Template, data licenseData) ([]by
327327
".ex", ".exs",
328328
".fpp",
329329
".graphql",
330+
".ini",
330331
".jl",
331332
".nix",
332333
".pl",

main_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ func TestLicenseHeader(t *testing.T) {
352352
"f.ex", "f.exs",
353353
"f.graphql",
354354
"f.jl",
355+
"f.ini",
355356
"f.nix",
356357
"f.pl",
357358
"f.pp",

testdata/expected/file.ini

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
[pytest]
16+
addopts = --doctest-glob="*.md" --doctest-modules --numprocesses auto --random-order --strict-config --strict-markers
17+
empty_parameter_set_mark = xfail
18+
xfail_strict=true
19+
markers =
20+
slow: mark test as slow to run
21+
integration: mark test as an integration test
22+
unit: mark test as a unit test
23+
regression: mark test as a regression test
24+
flaky: mark test as flaky, may need to be retried

testdata/initial/file.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[pytest]
2+
addopts = --doctest-glob="*.md" --doctest-modules --numprocesses auto --random-order --strict-config --strict-markers
3+
empty_parameter_set_mark = xfail
4+
xfail_strict=true
5+
markers =
6+
slow: mark test as slow to run
7+
integration: mark test as an integration test
8+
unit: mark test as a unit test
9+
regression: mark test as a regression test
10+
flaky: mark test as flaky, may need to be retried

0 commit comments

Comments
 (0)