Skip to content

Commit e731cb5

Browse files
Switch from pre-commit.ci to autofix.ci + dprint, update shared configs (#324)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 2a5f8f3 commit e731cb5

18 files changed

+148
-132
lines changed

.dprint.jsonc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// https://dprint.dev/config/#extending-a-different-configuration-file
3+
"extends": "https://raw.githubusercontent.com/BesLogic/shared-configs/main/.dprint.jsonc",
4+
}

.github/workflows/autofix.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# https://autofix.ci/setup#getting-started
2+
name: autofix.ci # needed to securely identify the workflow
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
autofix:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: astral-sh/ruff-action@v3
17+
with:
18+
version-file: "pyproject.toml"
19+
args: "check --fix"
20+
- run: ruff format
21+
# Format even if the the previous step failed
22+
if: ${{ !cancelled() }}
23+
24+
- run: npx dprint fmt
25+
# Format even if the the previous step failed
26+
if: ${{ !cancelled() }}
27+
28+
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef

.github/workflows/lint-and-build.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,6 @@ concurrency:
3636
cancel-in-progress: true
3737

3838
jobs:
39-
Ruff:
40-
runs-on: ubuntu-22.04
41-
steps:
42-
- uses: actions/checkout@v4
43-
- uses: astral-sh/ruff-action@v3
44-
with:
45-
version-file: "pyproject.toml"
46-
- run: ruff format --check --diff
47-
# Show formatting issues even if the "check" step failed
48-
if: ${{ !cancelled() }}
49-
5039
Pyright:
5140
runs-on: ${{ matrix.os }}
5241
strategy:

.pre-commit-config.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// Only keep those used by your specific project
1111
"recommendations": [
1212
// General
13+
"dprint.dprint",
1314
"eamodio.gitlens",
1415
"editorconfig.editorconfig",
1516
"pkief.material-icon-theme",

.vscode/launch.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"preLaunchTask": "Compile resources",
1212
"program": "src/AutoSplit.py",
1313
"console": "integratedTerminal",
14-
"justMyCode": false
14+
"justMyCode": false,
1515
},
1616
{
1717
"name": "Python: AutoSplit",
@@ -20,7 +20,7 @@
2020
"preLaunchTask": "Compile resources",
2121
"program": "src/AutoSplit.py",
2222
"console": "integratedTerminal",
23-
"justMyCode": true
23+
"justMyCode": true,
2424
},
2525
{
2626
"name": "Python: AutoSplit --auto-controlled",
@@ -29,10 +29,10 @@
2929
"preLaunchTask": "Compile resources",
3030
"program": "src/AutoSplit.py",
3131
"args": [
32-
"--auto-controlled"
32+
"--auto-controlled",
3333
],
3434
"console": "integratedTerminal",
35-
"justMyCode": true
36-
}
37-
]
35+
"justMyCode": true,
36+
},
37+
],
3838
}

.vscode/settings.json

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@
55
// https://github.com/BesLogic/shared-configs/blob/main/.vscode/settings.json
66
// Modifications to this file that are not project-specific should also be done upstream.
77
{
8-
"json.schemas": [
9-
{
10-
// Not all .jsonc files have a pre-associated schema
11-
"fileMatch": [
12-
"*.jsonc",
13-
],
14-
"schema": {
15-
"allowTrailingCommas": true,
16-
},
8+
"json.schemas": [{
9+
// Not all .jsonc files have a pre-associated schema
10+
"fileMatch": ["*.jsonc"],
11+
"schema": {
12+
"allowTrailingCommas": true,
1713
},
18-
],
14+
}],
1915
"files.associations": {
2016
// Qt Creator
2117
"*.qrc": "xml",
@@ -64,24 +60,28 @@
6460
// IDEM, but also it's annoying to remove imports because of commented code while testing
6561
"source.removeUnusedImports": "never",
6662
},
63+
6764
// NOTE: due to a bug in VSCode, we have to specify editor.defaultFormatter individually to ensure
6865
// it overrides user settings. Please upvote: https://github.com/microsoft/vscode/issues/168411
66+
6967
/*
7068
* Markdown
7169
*/
7270
"[markdown]": {
7371
"files.trimTrailingWhitespace": false,
74-
"editor.defaultFormatter": "vscode.markdown-language-features",
72+
"editor.defaultFormatter": "dprint.dprint",
7573
},
74+
7675
/*
7776
* JSON
7877
*/
7978
"[json]": {
80-
"editor.defaultFormatter": "vscode.json-language-features",
79+
"editor.defaultFormatter": "dprint.dprint",
8180
},
8281
"[jsonc]": {
83-
"editor.defaultFormatter": "vscode.json-language-features",
82+
"editor.defaultFormatter": "dprint.dprint",
8483
},
84+
8585
/*
8686
* Python
8787
*/
@@ -111,6 +111,7 @@
111111
"ruff.organizeImports": true,
112112
// Use the Ruff extension instead
113113
"isort.check": false,
114+
114115
/*
115116
* TOML
116117
*/
@@ -134,15 +135,17 @@
134135
"evenBetterToml.formatter.trailingNewline": true,
135136
// We like keeping TOML keys in a certain non-alphabetical order that feels more natural
136137
"evenBetterToml.formatter.reorderKeys": false,
138+
137139
/*
138140
* YAML
139141
*/
140142
"[yaml]": {
141-
"editor.defaultFormatter": "redhat.vscode-yaml",
143+
"editor.defaultFormatter": "dprint.dprint",
142144
},
143145
"yaml.schemas": {
144146
"https://json.schemastore.org/github-issue-config.json": ".github/ISSUE_TEMPLATE/config.yml",
145147
},
148+
146149
/*
147150
* XML
148151
*/
@@ -167,6 +170,7 @@
167170
// Custom
168171
"string",
169172
],
173+
170174
/*
171175
* Powershell
172176
*/

.vscode/tasks.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,47 @@
88
"-NoProfile",
99
"-ExecutionPolicy",
1010
"Bypass",
11-
"-Command"
12-
]
13-
}
14-
}
11+
"-Command",
12+
],
13+
},
14+
},
1515
},
1616
"linux": {
1717
"options": {
1818
"shell": {
1919
"executable": "pwsh",
2020
"args": [
2121
"-NoProfile",
22-
"-Command"
23-
]
24-
}
25-
}
22+
"-Command",
23+
],
24+
},
25+
},
2626
},
2727
"osx": {
2828
"options": {
2929
"shell": {
3030
"executable": "pwsh",
3131
"args": [
3232
"-NoProfile",
33-
"-Command"
34-
]
35-
}
36-
}
33+
"-Command",
34+
],
35+
},
36+
},
3737
},
3838
"tasks": [
3939
{
4040
"label": "Compile resources",
4141
"type": "shell",
42-
"command": "scripts/compile_resources.ps1"
42+
"command": "scripts/compile_resources.ps1",
4343
},
4444
{
4545
"label": "Build AutoSplit",
4646
"type": "shell",
4747
"command": "scripts/build.ps1",
4848
"group": {
4949
"kind": "build",
50-
"isDefault": true
51-
}
52-
}
53-
]
50+
"isDefault": true,
51+
},
52+
},
53+
],
5454
}

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To understand how to use AutoSplit and how it works in-depth, please read the [t
2222
## Download and open
2323

2424
- Download the [latest version](/../../releases/latest)
25-
- You can also check out the [latest dev builds](/../../actions/workflows/lint-and-build.yml?query=event%3Apush+is%3Asuccess) (requires a GitHub account)
25+
- You can also check out the [latest dev builds](/../../actions/workflows/lint-and-build.yml?query=event%3Apush+is%3Asuccess) (requires a GitHub account)\
2626
(If you don't have a GitHub account, you can try [nightly.link](https://nightly.link/Toufool/AutoSplit/workflows/lint-and-build/main))
2727
- Linux users must ensure they are in the `tty` and `input` groups and have write access to `/dev/uinput`. You can run the following commands to do so:
2828

@@ -77,17 +77,19 @@ See the [installation instructions](https://github.com/Toufool/LiveSplit.AutoSpl
7777
## Resources
7878

7979
Still need help?
80+
8081
<!-- open issues sorted by reactions -->
82+
8183
- [Check if your issue already exists](../../issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc)
8284
- If it does, upvote it 👍
8385
- If it doesn't, create a new one
84-
- Join the [AutoSplit Discord
85-
![AutoSplit Discord](https://badgen.net/discord/members/Qcbxv9y)](https://discord.gg/Qcbxv9y)
86+
- Join the [AutoSplit Discord\
87+
![AutoSplit Discord](https://badgen.net/discord/members/Qcbxv9y)](https://discord.gg/Qcbxv9y)
8688

8789
## Contributing
8890

89-
See [CONTRIBUTING.md](/docs/CONTRIBUTING.md) for our contributing standards.
90-
Refer to the [build instructions](/docs/build%20instructions.md) if you're interested in building the application yourself or running it in Python.
91+
See [CONTRIBUTING.md](/docs/CONTRIBUTING.md) for our contributing standards.\
92+
Refer to the [build instructions](/docs/build%20instructions.md) if you're interested in building the application yourself or running it in Python.
9193

9294
Not a developer? You can still help through the following methods:
9395

SECURITY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Supported Versions
44

5-
| Version | Supported |
6-
| ------- | :-------: |
7-
| main | :white_check_mark: |
5+
| Version | Supported |
6+
| --------------- | :-------------------------------------------: |
7+
| main | :white_check_mark: |
88
| everything else | WIP branches, security support may be lacking |
99

1010
## Reporting a Vulnerability

0 commit comments

Comments
 (0)