Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(lint): upgrade trunk #24

Merged
merged 1 commit into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/01_question.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ about: Got stuck or found something to be missing in the docs? Ask away!
labels: question
---

# Fill the question form below and remove this heading

**What can we help you with?**

<!-- Try to explain your question with as much detail as you can provide. -->
Expand Down
7 changes: 6 additions & 1 deletion .github/ISSUE_TEMPLATE/02_bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ about: Spotted a problem? Let us know!
labels: bug
---

# Fill the question form below and remove this heading

**What happened?**

<!-- Try to be as precise as possible. Please provide all the required information for others to be able to reproduce it. -->
<!--
Try to be as precise as possible.
Please provide all the required information for others to be able to reproduce it.
-->

**What did you expect to happen?**

Expand Down
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/03_feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ about: What would make this project even better?
labels: enhancement
---

# Fill the question form below and remove this heading

**What is currently missing?**

<!-- Please, describe what is currently missing and why should it be present in the project. -->
Expand All @@ -14,4 +16,4 @@ labels: enhancement

**Is this a feature you would work on yourself?**

* [ ] I plan to open a pull request for this feature.
- [ ] I plan to open a pull request for this feature.
10 changes: 7 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Fill the question form below and remove this heading

**About this change—what it does?**

<!-- Please include a summary of the change and which issue is fixed, relevant motivation and context. Don't forget to list any dependencies that are required for this change. -->
<!--
Please include a summary of the change and which issue is fixed, relevant motivation and context.
Don't forget to list any dependencies that are required for this change.
-->

**What type of change is it?**

Expand All @@ -11,8 +16,7 @@
- [ ] Dependencies bump, i.e. upgrade of dependencies this project uses
- [ ] Documentation update, i.e. documentation-only change
- [ ] New feature, i.e. non-breaking change which adds functionality
\
&nbsp;

- [ ] This change requires a documentation update

**Have you checked yourself twice?**
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ permissions:
jobs:
codeql:
runs-on: macos-latest
if: (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) || github.event_name == 'push'
if: >
(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) ||
github.event_name == 'push'
steps:
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v2
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/dependency_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ permissions:
jobs:
dependency-review:
runs-on: ubuntu-latest
if: (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) || github.event_name == 'push'
if: >
(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) ||
github.event_name == 'push'
steps:
- uses: actions/checkout@v3
- uses: actions/dependency-review-action@v3
23 changes: 9 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,25 @@ jobs:
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
markdownlint:
runs-on: ubuntu-latest
if: (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) || github.event_name == 'push'
steps:
- uses: actions/checkout@v3
- uses: DavidAnson/markdownlint-cli2-action@v9
with:
globs: |
**/*.md
!.github/**
!.trunk/**
!LICENSE.md
!CHANGELOG.md
trunk:
if: >
(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) ||
github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: stable
- uses: trunk-io/trunk-action@v1
golangci-lint:
if: >
(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) ||
github.event_name == 'push'
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: stable
- uses: golangci/golangci-lint-action@v3
3 changes: 0 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,3 @@ linters-settings:

issues:
exclude-use-default: false

run:
go: "1.17" # See https://github.com/golangci/golangci-lint/issues/2649.
12 changes: 6 additions & 6 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"default": true,
"MD013": {
"line_length": 120,
"code_blocks": false,
"tables": false
},
"default": true,
"MD013": {
"line_length": 120,
"code_blocks": false,
"tables": false
}
}
3 changes: 3 additions & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
*out
*logs
*actions
*notifications
plugins
user_trunk.yaml
user.yaml
10 changes: 10 additions & 0 deletions .trunk/configs/.yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rules:
quoted-strings:
required: only-when-needed
extra-allowed: ["{|}"]
empty-values:
forbid-in-block-mappings: true
forbid-in-flow-mappings: true
key-duplicates: {}
octal-values:
forbid-implicit-octal: true
32 changes: 27 additions & 5 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
version: 0.1
cli:
version: 0.16.1-beta
version: 1.7.0
lint:
enabled:
- actionlint@1.6.24
- markdownlint@0.33.0
- yamllint@1.30.0
- git-diff-check@SYSTEM
- gitleaks@8.11.2
- gofmt@1.16.7
# - golangci-lint@1.46.2 # This currently fails to lint files that use cgo.
- prettier@2.6.2
- gitleaks@8.16.2
- gofmt@1.19.3
# - golangci-lint@1.52.2 # This currently fails to lint files that use cgo.
- prettier@2.8.7
ignore:
- linters:
- markdownlint
paths:
- LICENSE.md
- CHANGELOG.md
actions:
enabled:
- trunk-upgrade-available
plugins:
sources:
- id: trunk
ref: v0.0.14
uri: https://github.com/trunk-io/plugins
runtimes:
enabled:
- python@3.10.8
- go@1.19.5
- node@18.12.1