File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -761,3 +761,16 @@ ij_properties_spaces_around_key_value_delimiter = false
761761[{* .yaml, * .yml} ]
762762ij_yaml_keep_indents_on_empty_lines = false
763763ij_yaml_keep_line_breaks = true
764+
765+ # ktlint overrides (mirrors otel.spotless-conventions.gradle.kts)
766+ [{* .kt, * .kts} ]
767+ max_line_length = 160
768+ continuation_indent_size = 2
769+ ktlint_standard_no-wildcard-imports = disabled
770+ ktlint_standard_package-name = disabled
771+ ktlint_standard_max-line-length = disabled
772+ ktlint_standard_trailing-comma-on-call-site = disabled
773+ ktlint_standard_trailing-comma-on-declaration-site = disabled
774+ ktlint_standard_wrapping = disabled
775+ ktlint_standard_property-naming = disabled
776+ ktlint_standard_function-literal = disabled
Original file line number Diff line number Diff line change 1+ [settings ]
2+ exclude = " gradlew|buildscripts/spotless\\ .license\\ .java|CHANGELOG\\ .md|licenses/licenses\\ .md"
3+
4+ [checks .license-header ]
5+ text = """
6+ /*
7+ * Copyright The OpenTelemetry Authors
8+ * SPDX-License-Identifier: Apache-2.0
9+ */"""
10+ patterns = [" **/*.java" , " **/*.kt" ]
Original file line number Diff line number Diff line change 2525 muzzle :
2626 uses : ./.github/workflows/reusable-muzzle.yml
2727
28- link-check :
29- uses : ./.github/workflows/reusable-link-check.yml
30-
31- markdown-lint-check :
32- uses : ./.github/workflows/reusable-markdown-lint-check.yml
28+ lint :
29+ uses : ./.github/workflows/reusable-lint-check.yml
3330
3431 publish-snapshots :
3532 environment : protected
Original file line number Diff line number Diff line change @@ -40,15 +40,11 @@ jobs:
4040 with :
4141 cache-read-only : true
4242
43- # this is not a required check to avoid blocking pull requests if external links break
44- markdown-check :
43+ lint :
4544 # release branches are excluded because the README.md javaagent download link has to be updated
4645 # on release branches before the release download has been published
4746 if : " !startsWith(github.ref_name, 'release/') && !startsWith(github.base_ref, 'release/')"
48- uses : ./.github/workflows/reusable-link-check.yml
49-
50- markdown-lint-check :
51- uses : ./.github/workflows/reusable-markdown-lint-check.yml
47+ uses : ./.github/workflows/reusable-lint-check.yml
5248
5349 required-status-check :
5450 # test-latest-deps is not included in the required status checks
6359 needs :
6460 - common
6561 - muzzle
66- - markdown- lint-check
62+ - lint
6763 runs-on : ubuntu-latest
6864 if : always()
6965 steps :
7369 !startsWith(github.base_ref, 'release/') &&
7470 (
7571 needs.muzzle.result != 'success' ||
76- needs.markdown- lint-check .result != 'success'
72+ needs.lint.result != 'success'
7773 )
7874 )
7975 run: exit 1 # fail
Original file line number Diff line number Diff line change 3434 if : " !startsWith(github.ref_name, 'release/')"
3535 uses : ./.github/workflows/reusable-muzzle.yml
3636
37- link-check :
38- # release branches are excluded to avoid unnecessary maintenance if external links break
39- # (and also because the README.md javaagent download link has to be updated on release branches
40- # before the release download has been published)
37+ lint :
38+ # release branches are excluded because the README.md javaagent download link has to be updated
39+ # on release branches before the release download has been published
4140 if : " !startsWith(github.ref_name, 'release/')"
42- uses : ./.github/workflows/reusable-link-check.yml
43-
44- markdown-lint-check :
45- # release branches are excluded
46- if : " !startsWith(github.ref_name, 'release/')"
47- uses : ./.github/workflows/reusable-markdown-lint-check.yml
41+ uses : ./.github/workflows/reusable-lint-check.yml
Original file line number Diff line number Diff line change 1- name : Reusable - Link check
1+ name : Reusable - Lint check
22
33on :
44 workflow_call :
@@ -7,7 +7,7 @@ permissions:
77 contents : read
88
99jobs :
10- link -check :
10+ lint -check :
1111 runs-on : ubuntu-latest
1212 steps :
1313 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -16,16 +16,16 @@ jobs:
1616
1717 - uses : jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
1818
19- - name : Link check for pull requests
19+ - name : Lint for pull requests
2020 if : github.event_name == 'pull_request'
2121 env :
2222 GITHUB_TOKEN : ${{ github.token }}
2323 GITHUB_HEAD_SHA : ${{ github.event.pull_request.head.sha }}
2424 PR_HEAD_REPO : ${{ github.event.pull_request.head.repo.full_name }}
25- run : mise run lint:links
25+ run : mise run lint
2626
27- - name : Link check for pushes and scheduled workflows
27+ - name : Lint for pushes and scheduled workflows
2828 if : github.event_name != 'pull_request'
2929 env :
3030 GITHUB_TOKEN : ${{ github.token }}
31- run : mise run lint:links --full
31+ run : mise run lint
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11[tools ]
2+ "cargo:https://github.com/grafana/flint" = " rev:113b8cd5910bfd58881cd520daf02040d25b640e"
23lychee = " 0.23.0"
34markdownlint-cli2 = " 0.22.0"
5+ "github:google/google-java-format" = " 1.35.0"
6+ "github:pinterest/ktlint" = " 1.8.0"
7+
8+ [env ]
9+ FLINT_CONFIG_DIR = " .github/config"
410
511[settings ]
612# Only install tools explicitly defined in the [tools] section above
@@ -12,7 +18,11 @@ windows_executable_extensions = ["sh"]
1218windows_default_file_shell_args = " bash"
1319use_file_shell_for_executable_tasks = true
1420
15- # Pick the tasks you need from flint (https://github.com/grafana/flint)
16- [tasks ."lint:links" ]
17- description = " Check for broken links in changed files + all local links"
18- file = " https://raw.githubusercontent.com/grafana/flint/eded4cd370c729289a6de327a1a26831e10a39b9/tasks/lint/links.sh" # v0.20.2
21+ [tasks .lint ]
22+ run = " flint run"
23+
24+ [tasks ."lint:fix" ]
25+ run = " flint run --fix"
26+
27+ [tasks ."lint:pre-commit" ]
28+ run = " flint run --fix --fast-only"
You can’t perform that action at this time.
0 commit comments