Skip to content

Commit 1c90b50

Browse files
esolitosgitbutler-client
authored andcommitted
chore: contrib action "golangci/golangci-lint-action" at v8.0.0 tag (main#4afd733)
1 parent 63a17c1 commit 1c90b50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+205011
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"jest": true
5+
},
6+
"parser": "@typescript-eslint/parser",
7+
"parserOptions": {
8+
"ecmaVersion": 2020,
9+
"sourceType": "module"
10+
},
11+
"extends": [
12+
"eslint:recommended",
13+
"plugin:@typescript-eslint/eslint-recommended",
14+
"plugin:@typescript-eslint/recommended",
15+
"plugin:import/errors",
16+
"plugin:import/warnings",
17+
"plugin:import/typescript",
18+
"plugin:prettier/recommended"
19+
],
20+
"plugins": [
21+
"@typescript-eslint",
22+
"simple-import-sort"
23+
],
24+
"rules": {
25+
"import/first": "error",
26+
"import/newline-after-import": "error",
27+
"import/no-duplicates": "error",
28+
"simple-import-sort/imports": "error",
29+
"simple-import-sort/exports": "error",
30+
"sort-imports": "off"
31+
}
32+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/** linguist-generated=true
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: 🐞 Bug Report
2+
description: "Create a report to help us improve."
3+
body:
4+
- type: checkboxes
5+
id: terms
6+
attributes:
7+
label: Welcome
8+
options:
9+
- label: Yes, I understand that the GitHub action repository is not the repository of golangci-lint itself.
10+
required: true
11+
- label: Yes, I've searched similar issues on GitHub and didn't find any.
12+
required: true
13+
- label: Yes, I've included all information below (version, config, etc).
14+
required: true
15+
16+
- type: textarea
17+
id: problem
18+
attributes:
19+
label: Description of the problem
20+
placeholder: Your problem description
21+
validations:
22+
required: true
23+
24+
- type: input
25+
id: golangci-lint-version
26+
attributes:
27+
label: Version of golangci-lint
28+
validations:
29+
required: true
30+
31+
- type: input
32+
id: github-action-version
33+
attributes:
34+
label: Version of the GitHub Action
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
id: workflow-file
40+
attributes:
41+
label: Workflow file
42+
value: |-
43+
<details>
44+
45+
```yml
46+
<add your file content here>
47+
```
48+
49+
</details>
50+
validations:
51+
required: true
52+
53+
- type: textarea
54+
id: config
55+
attributes:
56+
label: Golangci-lint configuration
57+
value: |-
58+
<details>
59+
60+
```yml
61+
<add your file content here>
62+
```
63+
64+
</details>
65+
validations:
66+
required: true
67+
68+
- type: input
69+
id: go-env
70+
attributes:
71+
label: Go version
72+
validations:
73+
required: true
74+
75+
- type: textarea
76+
id: code-example
77+
attributes:
78+
label: Code example or link to a public repository
79+
value: |-
80+
<details>
81+
82+
```go
83+
// add your code here
84+
```
85+
86+
</details>
87+
validations:
88+
required: true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 📖 Golangci-lint documentation
4+
url: https://golangci-lint.run
5+
about: Please take a look to our documentation.
6+
- name: ❓ Questions
7+
url: https://github.com/golangci/golangci-lint-action/discussions
8+
about: If you have a question, or are looking for advice, please post on our Discussions forum!
9+
- name: 💬 Chat on Slack
10+
url: https://gophers.slack.com/archives/CS0TBRKPC
11+
about: Maybe chatting with the community can help
12+
- name: 🏡 Golangci-lint main repository
13+
url: https://github.com/golangci/golangci-lint
14+
about: The main repository of golangci-lint.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: 💡 Feature request
2+
description: "Suggest an idea for this project."
3+
body:
4+
- type: checkboxes
5+
id: terms
6+
attributes:
7+
label: Welcome
8+
options:
9+
- label: Yes, I understand that the GitHub action repository is not the repository of golangci-lint itself.
10+
required: true
11+
- label: Yes, I've searched similar issues on GitHub and didn't find any.
12+
required: true
13+
14+
- type: textarea
15+
id: problem
16+
attributes:
17+
label: Your feature request related to a problem? Please describe.
18+
placeholder: "A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]"
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: solution
24+
attributes:
25+
label: Describe the solution you'd like.
26+
placeholder: "A clear and concise description of what you want to happen."
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: alternatives
32+
attributes:
33+
label: Describe alternatives you've considered.
34+
placeholder: "A clear and concise description of any alternative solutions or features you've considered."
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
id: additional
40+
attributes:
41+
label: Additional context.
42+
placeholder: "Add any other context or screenshots about the feature request here."
43+
validations:
44+
required: false
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: npm
8+
directory: "/"
9+
groups:
10+
dev-dependencies:
11+
dependency-type: development
12+
dependencies:
13+
dependency-type: production
14+
schedule:
15+
interval: weekly
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
changelog:
2+
categories:
3+
- title: Changes
4+
labels:
5+
- '*'
6+
exclude:
7+
labels:
8+
- documentation
9+
- dependencies
10+
- title: Documentation
11+
labels:
12+
- documentation
13+
- title: Dependencies
14+
labels:
15+
- dependencies
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Code Scanning - Action"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
# The branches below must be a subset of the branches above
9+
branches:
10+
- main
11+
schedule:
12+
- cron: '0 17 * * 5'
13+
14+
jobs:
15+
codeQL:
16+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
# Must fetch at least the immediate parents so that if this is
24+
# a pull request then we can checkout the head of the pull request.
25+
# Only include this option if you are running this workflow on pull requests.
26+
fetch-depth: 2
27+
28+
# If this run was triggered by a pull request event then checkout
29+
# the head of the pull request instead of the merge commit.
30+
# Only include this step if you are running this workflow on pull requests.
31+
- run: git checkout HEAD^2
32+
if: ${{ github.event_name == 'pull_request' }}
33+
34+
# Initializes the CodeQL tools for scanning.
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v3
37+
# Override language selection by uncommenting this and choosing your languages
38+
with:
39+
language: 'javascript'
40+
41+
- run: |
42+
npm install
43+
npm run all
44+
45+
- name: Perform CodeQL Analysis
46+
uses: github/codeql-action/analyze@v3
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: "build-and-test"
2+
on: # rebuild any PRs and main branch changes
3+
pull_request:
4+
branches:
5+
- main
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
build: # make sure build/ci work properly
12+
runs-on: ubuntu-latest
13+
steps:
14+
- if: ${{ !(github.event_name == 'pull_request' && (github.event.pull_request.user.id == 49699333 || contains(github.event.pull_request.labels.*.name, 'dependencies'))) }}
15+
uses: actions/checkout@v4
16+
- if: github.event_name == 'pull_request' && (github.event.pull_request.user.id == 49699333 || contains(github.event.pull_request.labels.*.name, 'dependencies'))
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
ref: ${{ github.event.pull_request.head.ref }}
21+
22+
- run: |
23+
npm install
24+
npm run all
25+
26+
# Update dist files if there is label dependencies or pull request' author is dependabot[bot] (id = 49699333)
27+
- name: Update dist files
28+
if: github.event_name == 'pull_request' && (github.event.pull_request.user.id == 49699333 || contains(github.event.pull_request.labels.*.name, 'dependencies'))
29+
run: |
30+
if [[ -z $(git status -s) ]]
31+
then
32+
echo "No change is required"
33+
else
34+
echo "Updating dist directory"
35+
git config --local user.name "dependabot[bot]"
36+
git config --local user.email "49699333+dependabot[bot]@users.noreply.github.com"
37+
git add --update
38+
git commit --message="Update dist files"
39+
git push
40+
fi
41+
42+
# Fail the build if there is dirty change
43+
- run: git diff --exit-code
44+
45+
test: # make sure the action works on a clean machine without building
46+
needs: [ build ]
47+
strategy:
48+
matrix:
49+
os:
50+
- ubuntu-latest
51+
- ubuntu-22.04-arm
52+
- macos-latest
53+
- windows-latest
54+
version:
55+
- ""
56+
- "latest"
57+
- "v2.1"
58+
- "v2.1.0"
59+
runs-on: ${{ matrix.os }}
60+
permissions:
61+
contents: read
62+
pull-requests: read
63+
steps:
64+
- uses: actions/checkout@v4
65+
- uses: actions/setup-go@v5
66+
with:
67+
go-version: oldstable
68+
- uses: ./
69+
with:
70+
version: ${{ matrix.version }}
71+
args: --timeout=5m --issues-exit-code=0 ./sample/...
72+
only-new-issues: true
73+
74+
test-go-install: # make sure the action works on a clean machine without building (go-install mode)
75+
needs: [ build ]
76+
strategy:
77+
matrix:
78+
os:
79+
- ubuntu-latest
80+
- ubuntu-22.04-arm
81+
- macos-latest
82+
- windows-latest
83+
version:
84+
- ""
85+
- "latest"
86+
- "v2.1.0"
87+
- "f6c2e6c999dfae444d1fe7f1b0d49becdae44547"
88+
runs-on: ${{ matrix.os }}
89+
permissions:
90+
contents: read
91+
pull-requests: read
92+
steps:
93+
- uses: actions/checkout@v4
94+
- uses: actions/setup-go@v5
95+
with:
96+
go-version: oldstable
97+
- uses: ./
98+
with:
99+
version: ${{ matrix.version }}
100+
args: --timeout=5m --issues-exit-code=0 ./sample/...
101+
only-new-issues: true
102+
install-mode: goinstall
103+
104+
test-go-mod:
105+
needs: [ build ]
106+
strategy:
107+
matrix:
108+
os:
109+
- ubuntu-latest
110+
- ubuntu-22.04-arm
111+
- macos-latest
112+
- windows-latest
113+
wd:
114+
- sample-go-mod
115+
- sample-go-tool
116+
runs-on: ${{ matrix.os }}
117+
permissions:
118+
contents: read
119+
steps:
120+
- uses: actions/checkout@v4
121+
- uses: actions/setup-go@v5
122+
with:
123+
go-version: oldstable
124+
- uses: ./
125+
with:
126+
working-directory: ${{ matrix.wd }}
127+
args: --timeout=5m --issues-exit-code=0 ./...

0 commit comments

Comments
 (0)